Class ColorRegistry.Builder
- java.lang.Object
-
- com.google.javascript.jscomp.colors.ColorRegistry.Builder
-
- Enclosing class:
- ColorRegistry
public static final class ColorRegistry.Builder extends java.lang.ObjectRecords the state for a partially-built ColorRegistry. Create withColorRegistry.builder()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorRegistrybuild()com.google.common.collect.ImmutableMap<NativeColorId,Color>getNativePrimitives()Returns a copy of all the native type-system primitive colors.ColorRegistry.BuilderwithNativeObjectColors(com.google.common.collect.ImmutableMap<NativeColorId,Color> nativeObjectColors)Instantiate the registry with custom implementations of the given colors
-
-
-
Method Detail
-
withNativeObjectColors
public ColorRegistry.Builder withNativeObjectColors(com.google.common.collect.ImmutableMap<NativeColorId,Color> nativeObjectColors)
Instantiate the registry with custom implementations of the given colorsMay only be called on colors for which {@link NativeColorId::isTypesystemPrimitive} is false.
-
getNativePrimitives
public com.google.common.collect.ImmutableMap<NativeColorId,Color> getNativePrimitives()
Returns a copy of all the native type-system primitive colors.Allows code to request default implementations of all the primitive colors, then use those default implementations to build more complex, non-default implementations of native objects like boxed scalars Number/String/etc.)
-
build
public ColorRegistry build()
-
-