Class SimpleSplittingSubstitutionMap

  • All Implemented Interfaces:
    SubstitutionMap

    public class SimpleSplittingSubstitutionMap
    extends java.lang.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:
    SimpleSplittingSubstitutionMapProvider
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get​(java.lang.String value)
      Gets the string that should be substituted for key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleSplittingSubstitutionMap

        public SimpleSplittingSubstitutionMap()
    • Method Detail

      • get

        public java.lang.String get​(java.lang.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