Class Color


  • @Immutable
    public abstract class Color
    extends java.lang.Object
    A simplified version of a Closure or TS type for use by optimizations
    • Constructor Detail

      • Color

        public Color()
    • Method Detail

      • union

        public abstract com.google.common.collect.ImmutableCollection<Color> union()
      • isPrimitive

        public final boolean isPrimitive()
        Whether this corresponds to a single JavaScript primitive like number or symbol or to a union of such primitives

        Note that the boxed versions of primitives (String, Number, etc.) are /not/ considered "primitive" by this method.

      • isUnion

        public final boolean isUnion()
      • isInvalidating

        public final boolean isInvalidating()
      • propertiesKeepOriginalName

        public final boolean propertiesKeepOriginalName()
      • is

        public final boolean is​(NativeColorId color)
        Whether this is exactly the given native color (and not a union containing that color
      • isConstructor

        public final boolean isConstructor()
        Whether this is a constructor (a type that TypeScript or Closure allows calling with 'new'

        For unions, returns true if and only if all alternates in the union are constructors

      • getId

        public final com.google.common.collect.ImmutableSet<java.lang.String> getId()
      • getDebugInfo

        public final com.google.common.collect.ImmutableSet<DebugInfo> getDebugInfo()
      • getPrototype

        public final com.google.common.collect.ImmutableSet<Color> getPrototype()
      • getInstanceColor

        public final com.google.common.collect.ImmutableSet<Color> getInstanceColor()
      • getDisambiguationSupertypes

        public final com.google.common.collect.ImmutableList<Color> getDisambiguationSupertypes()
      • getNativeColorIds

        public final com.google.common.collect.ImmutableSet<NativeColorId> getNativeColorIds()
      • createUnion

        public static Color createUnion​(com.google.common.collect.ImmutableSet<Color> alternates)
      • subtractNullOrVoid

        public final Color subtractNullOrVoid()