Class Color
- java.lang.Object
-
- com.google.javascript.jscomp.colors.Color
-
public abstract class Color extends java.lang.ObjectA simplified version of a Closure or TS type for use by optimizations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColor.BuilderBuilder for a singleton color.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ColorcreateUnion(java.util.Set<Color> elements)abstract @Nullable ColorIdgetBoxId()abstract ColorIdgetId()abstract com.google.common.collect.ImmutableSet<Color>getInstanceColors()abstract com.google.common.collect.ImmutableSet<java.lang.String>getOwnProperties()Property names 'declared' on an object (as opposed to being conceptually inherited from some supertype).abstract booleangetPropertiesKeepOriginalName()abstract com.google.common.collect.ImmutableSet<Color>getPrototypes()Given `function Foo() {}` or `class Foo {}`, color of Foo.prototype.abstract com.google.common.collect.ImmutableSet<Color>getUnionElements()abstract booleanisClosureAssert()Whether this type is some Closure assertion function removable by Closure-specific optimizations.abstract booleanisConstructor()abstract booleanisInvalidating()booleanisPrimitive()Whether this corresponds to a single JavaScript primitive like number or symbol.booleanisUnion()static Color.BuildersingleBuilder()ColorsubtractNullOrVoid()
-
-
-
Method Detail
-
getId
public abstract ColorId getId()
-
getPrototypes
public abstract com.google.common.collect.ImmutableSet<Color> getPrototypes()
Given `function Foo() {}` or `class Foo {}`, color of Foo.prototype. null otherwise.
-
getInstanceColors
public abstract com.google.common.collect.ImmutableSet<Color> getInstanceColors()
-
isInvalidating
public abstract boolean isInvalidating()
-
getPropertiesKeepOriginalName
public abstract boolean getPropertiesKeepOriginalName()
-
isConstructor
public abstract boolean isConstructor()
-
getOwnProperties
public abstract com.google.common.collect.ImmutableSet<java.lang.String> getOwnProperties()
Property names 'declared' on an object (as opposed to being conceptually inherited from some supertype).
-
getBoxId
public abstract @Nullable ColorId getBoxId()
-
isClosureAssert
public abstract boolean isClosureAssert()
Whether this type is some Closure assertion function removable by Closure-specific optimizations.
-
getUnionElements
public abstract com.google.common.collect.ImmutableSet<Color> getUnionElements()
-
singleBuilder
public static Color.Builder singleBuilder()
-
isPrimitive
public final boolean isPrimitive()
Whether this corresponds to a single JavaScript primitive like number or symbol.Note that the boxed versions of primitives (String, Number, etc.) are /not/ considered "primitive" by this method.
-
isUnion
public final boolean isUnion()
-
subtractNullOrVoid
@Memoized public Color subtractNullOrVoid()
-
-