Class SimpleSplittingSubstitutionMap

java.lang.Object
com.google.common.css.SimpleSplittingSubstitutionMap
All Implemented Interfaces:
SubstitutionMap

public class SimpleSplittingSubstitutionMap extends Object implements SubstitutionMap
This class uses SplittingSubstitutionMap to split css class names to their parts and then SimpleSubstitutionMap to append an underscore to each part. For example, kd-button would become kd_-button_.

This class is intended for use when debugging your application. This is because the class names will still be readable, but the minimal renaming ensures you'll also spot bugs where you've forgotten to use goog.getCssName('foo') or {css foo}.

To use this, pass the following flags to the CSS compiler:

   

   --css_substitution_map_provider=com.google.common.css.SimpleSplittingSubstitutionMapProvider
   --output_renaming_map_format=CLOSURE_COMPILED_SPLIT_HYPHENS
See Also:
  • Constructor Details

    • SimpleSplittingSubstitutionMap

      public SimpleSplittingSubstitutionMap()
  • Method Details

    • get

      public String get(String value)
      Description copied from interface: SubstitutionMap
      Gets the string that should be substituted for key. The same value must be consistently returned for any particular key, and the returned value must not be returned for any other key value.
      Specified by:
      get in interface SubstitutionMap
      Parameters:
      value - the text to be replaced (never null)
      Returns:
      the value to substitute for key