Class Color
java.lang.Object
com.google.javascript.jscomp.colors.Color
A simplified version of a Closure or TS type for use by optimizations
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorcreateUnion(Set<Color> elements) abstract @Nullable ColorIdgetBoxId()abstract ColorIdgetId()abstract com.google.common.collect.ImmutableSet<Color> abstract com.google.common.collect.ImmutableSet<String> Property names 'declared' on an object (as opposed to being conceptually inherited from some supertype).abstract booleanabstract com.google.common.collect.ImmutableSet<Color> Given `function Foo() {}` or `class Foo {}`, color of Foo.prototype.abstract com.google.common.collect.ImmutableSet<Color> abstract booleanWhether this type is some Closure assertion function removable by Closure-specific optimizations.abstract booleanabstract booleanfinal booleanWhether this corresponds to a single JavaScript primitive like number or symbol.final booleanisUnion()static Color.Builder
-
Method Details
-
getId
-
getPrototypes
Given `function Foo() {}` or `class Foo {}`, color of Foo.prototype. null otherwise. -
getInstanceColors
-
isInvalidating
public abstract boolean isInvalidating() -
getPropertiesKeepOriginalName
public abstract boolean getPropertiesKeepOriginalName() -
isConstructor
public abstract boolean isConstructor() -
getOwnProperties
Property names 'declared' on an object (as opposed to being conceptually inherited from some supertype). -
getBoxId
-
isClosureAssert
public abstract boolean isClosureAssert()Whether this type is some Closure assertion function removable by Closure-specific optimizations. -
getUnionElements
-
singleBuilder
-
createUnion
-
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
-