Class ColorDeserializer
- java.lang.Object
-
- com.google.javascript.jscomp.serialization.ColorDeserializer
-
public final class ColorDeserializer extends java.lang.ObjectConvert aTypePool(from a single compilation) intoColors.Future work will be necessary to let this class convert multiple type-pools coming from different libraries. For now it only handles a single type-pool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColorDeserializer.InvalidSerializedFormatExceptionError emitted when the deserializer sees a serialized type it cannot support deserialize
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColorDeserializerbuildFromTypePool(com.google.javascript.jscomp.serialization.TypePool typePool)Builds a pool of Colors and aColorRegistryfrom the given pool of types.ColorRegistrygetRegistry()ColorpointerToColor(com.google.javascript.jscomp.serialization.TypePointer typePointer)
-
-
-
Method Detail
-
getRegistry
public ColorRegistry getRegistry()
-
buildFromTypePool
public static ColorDeserializer buildFromTypePool(com.google.javascript.jscomp.serialization.TypePool typePool)
Builds a pool of Colors and aColorRegistryfrom the given pool of types.This method does all of the deserialization work in advance so that
getRegistry()andpointerToColor(TypePointer)willexecute in constant time.
-
pointerToColor
public Color pointerToColor(com.google.javascript.jscomp.serialization.TypePointer typePointer)
-
-