Class ColorDeserializer
- java.lang.Object
-
- com.google.javascript.jscomp.serialization.ColorDeserializer
-
public final class ColorDeserializer extends java.lang.Object
Convert aTypePool
(from a single compilation) intoColor
s.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 class
ColorDeserializer.InvalidSerializedFormatException
Error 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 ColorDeserializer
buildFromTypePool(com.google.javascript.jscomp.serialization.TypePool typePool, com.google.javascript.jscomp.serialization.StringPool stringPool)
Builds a pool of Colors and aColorRegistry
from the given pool of types.ColorRegistry
getRegistry()
Color
pointerToColor(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, com.google.javascript.jscomp.serialization.StringPool stringPool)
Builds a pool of Colors and aColorRegistry
from 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)
-
-