| Modifier and Type | Field and Description |
|---|---|
static JSType |
BOOLEAN |
protected static int |
BOOLEAN_MASK |
static JSType |
BOTTOM |
protected static int |
BOTTOM_MASK |
protected static int |
END_MASK |
protected static int |
ENUM_MASK |
protected static int |
FALSE_MASK |
static JSType |
FALSE_TYPE |
static JSType |
FALSY |
protected static int |
FALSY_MASK |
static boolean |
mockToString |
protected static int |
NON_SCALAR_MASK |
static JSType |
NULL |
protected static int |
NULL_MASK |
static JSType |
NULL_OR_UNDEF |
static JSType |
NUM_OR_STR |
static JSType |
NUMBER |
protected static int |
NUMBER_MASK |
static JSType |
STRING |
protected static int |
STRING_MASK |
static JSType |
TOP |
static JSType |
TOP_DICT |
protected static int |
TOP_MASK |
static JSType |
TOP_OBJECT |
static JSType |
TOP_SCALAR |
protected static int |
TOP_SCALAR_MASK |
static JSType |
TOP_STRUCT |
protected static int |
TRUE_MASK |
static JSType |
TRUE_TYPE |
static JSType |
TRUTHY |
protected static int |
TRUTHY_MASK |
protected static int |
TYPEVAR_MASK |
static JSType |
UNDEFINED |
protected static int |
UNDEFINED_MASK |
static JSType |
UNKNOWN |
protected static int |
UNKNOWN_MASK |
| Constructor and Description |
|---|
JSType() |
protected static final int BOTTOM_MASK
protected static final int TYPEVAR_MASK
protected static final int NON_SCALAR_MASK
protected static final int ENUM_MASK
protected static final int TRUE_MASK
protected static final int FALSE_MASK
protected static final int NULL_MASK
protected static final int NUMBER_MASK
protected static final int STRING_MASK
protected static final int UNDEFINED_MASK
protected static final int END_MASK
protected static final int TRUTHY_MASK
protected static final int FALSY_MASK
protected static final int UNKNOWN_MASK
protected static final int TOP_MASK
protected static final int BOOLEAN_MASK
protected static final int TOP_SCALAR_MASK
public static boolean mockToString
public static final JSType BOOLEAN
public static final JSType BOTTOM
public static final JSType FALSE_TYPE
public static final JSType FALSY
public static final JSType NULL
public static final JSType NUMBER
public static final JSType STRING
public static final JSType TOP
public static final JSType TOP_SCALAR
public static final JSType TRUE_TYPE
public static final JSType TRUTHY
public static final JSType UNDEFINED
public static final JSType UNKNOWN
public static final JSType TOP_OBJECT
public static final JSType TOP_STRUCT
public static final JSType TOP_DICT
public static final JSType NULL_OR_UNDEF
public static final JSType NUM_OR_STR
protected abstract int getMask()
protected abstract String getTypeVar()
protected abstract com.google.common.collect.ImmutableSet<EnumType> getEnums()
public Collection<JSType> getAlternates()
public static JSType fromObjectType(ObjectType obj)
public boolean isTop()
public boolean isUnknown()
public boolean isTruthy()
public boolean isFalsy()
public boolean isBoolean()
public boolean isString()
public boolean isNumber()
public boolean isNullOrUndef()
public boolean isScalar()
public boolean hasNonScalar()
public boolean isNullable()
public boolean isTypeVariable()
public boolean isStruct()
public boolean isLooseStruct()
public boolean isLoose()
public boolean isDict()
public boolean isEnumElement()
public boolean isUnion()
public JSType getEnumeratedType()
public JSType substituteGenericsWithUnknown()
public boolean unifyWithSubtype(JSType other, List<String> typeParameters, com.google.common.collect.Multimap<String,JSType> typeMultimap)
this, which may contain free type variables,
with other, a concrete subtype, modifying the supplied
typeMultimap to add any new template variable type bindings.
Note that if this is a union type, some of the union members may
be ignored if they are not present in other.public JSType negate()
public JSType toBoolean()
public boolean isNonLooseSubtypeOf(JSType other)
public boolean isSubtypeOf(TypeI other)
isSubtypeOf in interface TypeIpublic FunctionType getFunTypeIfSingletonObj()
public FunctionType getFunType()
public NominalType getNominalTypeIfSingletonObj()
public ObjectType getObjectTypeIfSingletonObj()
public boolean isInterfaceDefinition()
public JSType withLoose()
public JSType getProp(QualifiedName qname)
public JSType getDeclaredProp(QualifiedName qname)
public boolean mayHaveProp(QualifiedName qname)
public boolean hasProp(QualifiedName qname)
public boolean hasConstantProp(QualifiedName pname)
public JSType withoutProperty(QualifiedName qname)
public JSType withProperty(QualifiedName qname, JSType type)
public JSType withDeclaredProperty(QualifiedName qname, JSType type, boolean isConstant)
public StringBuilder appendTo(StringBuilder builder)
public boolean isConstructor()
isConstructor in interface TypeIpublic boolean isEquivalentTo(TypeI type)
isEquivalentTo in interface TypeIpublic boolean isFunctionType()
isFunctionType in interface TypeIpublic boolean isInterface()
isInterface in interface TypeIpublic boolean isUnknownType()
isUnknownType in interface TypeIpublic TypeI restrictByNotNullOrUndefined()
restrictByNotNullOrUndefined in interface TypeIpublic FunctionTypeI toMaybeFunctionType()
toMaybeFunctionType in interface TypeIpublic ObjectTypeI toMaybeObjectType()
toMaybeObjectType in interface TypeICopyright © 2009-2015 Google. All Rights Reserved.