Class ColorRegistry

java.lang.Object
com.google.javascript.jscomp.colors.ColorRegistry

public final class ColorRegistry extends Object
Stores "out of band" information about the set of Colors in use by a compilation.

This includes any information that isn't specifically can't be set on a single Color object,

  • Field Details

    • REQUIRED_IDS

      public static final com.google.common.collect.ImmutableSet<ColorId> REQUIRED_IDS
  • Method Details

    • get

      public final Color get(ColorId id)
    • getDisambiguationSupertypes

      public final com.google.common.collect.ImmutableSet<Color> getDisambiguationSupertypes(Color x)
      The colors directly above `x` in the subtyping graph for the purposes of property (dis)ambiguation.
    • getMismatchLocationsForDebugging

      public final com.google.common.collect.ImmutableSetMultimap<ColorId,String> getMismatchLocationsForDebugging()
      An index (mismatch sourceref string) => (involved color ids).

      This index is only intended for debugging. It may be empty or incomplete during production compilations.

    • builder

      public static ColorRegistry.Builder builder()