public final class TemplatizedType extends ProxyObjectType
Array..JSType.TypePairEMPTY_TYPE_COMPONENT, ENUMDECL, NOT_A_CLASS, NOT_A_TYPE, NOT_ENUMDECL, templateTypeMap, UNKNOWN_NAME| Modifier and Type | Method and Description |
|---|---|
JSType |
getPropertyType(String propertyName)
Gets the property type of the property whose name is given.
|
ObjectType |
getReferencedType() |
TemplateTypeMap |
getTemplateTypeMap()
Returns the template type map associated with this type.
|
com.google.common.collect.ImmutableList<JSType> |
getTemplateTypes()
Gets the declared default element type.
|
boolean |
hasAnyTemplateTypesInternal() |
boolean |
isSubtype(JSType that)
Checks whether
this is a subtype of that. |
TemplatizedType |
toMaybeTemplatizedType()
Downcasts this to a TemplatizedType, or returns null if this is not
a function.
|
<T> T |
visit(Visitor<T> visitor)
Visit this type with the given visitor.
|
canBeCalled, collapseUnion, findPropertyType, getConstructor, getCtorImplementedInterfaces, getImplicitPrototype, getJSDocInfo, getOwnerFunction, getReferenceName, getTypeOfThis, hashCode, hasReferenceName, isAllType, isCheckedUnknownType, isConstructor, isDict, isInstanceType, isInterface, isNativeObjectType, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isOrdinaryFunction, isStruct, isUnknownType, matchConstraint, matchesNumberContext, matchesObjectContext, matchesStringContext, removeProperty, setJSDocInfo, setPropertyJSDocInfo, testForEquality, toDebugHashCodeString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeTemplateType, toMaybeUnionType, visitReferenceTypecast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineInferredProperty, defineSynthesizedProperty, getCtorExtendedInterfaces, getDisplayName, getNormalizedReferenceName, getOwnPropertyJSDocInfo, getOwnPropertyNames, getOwnSlot, getParentScope, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyNames, getPropertyNode, getRootNode, getSlot, hasCachedValues, hasOwnProperty, hasProperty, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeInferredautobox, autoboxesTo, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, clearResolved, dereference, differsFrom, equals, extendTemplateTypeMap, getGreatestSubtype, getLeastSupertype, getRestrictedTypeGivenToBooleanOutcome, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, hasAnyTemplateTypes, hasDisplayName, isArrayType, isBooleanObjectType, isBooleanValueType, isDateType, isEmptyType, isEnumElementType, isEnumType, isEquivalent, isEquivalentTo, isFunctionType, isGlobalThisType, isInvariant, isNominalConstructor, isNullType, isNumber, isNumberObjectType, isNumberValueType, isRecordType, isRegexpType, isResolved, isString, isStringObjectType, isStringValueType, isTemplateType, isTemplatizedType, isUnionType, isVoidType, matchesInt32Context, matchesUint32Context, resolve, restrictByNotNullOrUndefined, setValidator, toAnnotationString, toMaybeFunctionType, toMaybeTemplateType, toMaybeTemplatizedType, toObjectType, toString, unboxesTopublic <T> T visit(Visitor<T> visitor)
JSTypevisit in class ProxyObjectTypeVisitorpublic TemplatizedType toMaybeTemplatizedType()
JSTypetoMaybeTemplatizedType in class ProxyObjectTypepublic com.google.common.collect.ImmutableList<JSType> getTemplateTypes()
ObjectTypegetTemplateTypes in class ProxyObjectTypeTemplatizedTypepublic JSType getPropertyType(String propertyName)
ObjectTypegetPropertyType in class ObjectTypeUnknownType. This method never
returns null.public boolean isSubtype(JSType that)
JSTypethis is a subtype of that.Subtyping rules:
(T<sub>1</sub>, …, T<sub>n</sub>) <: U if and only
T<sub>k</sub> <: U for all k ∈ 1..n.U <: (T<sub>1</sub>, …, T<sub>n</sub>) if and only
if U <: T<sub>k</sub> for some index k.O<sub>1</sub> is a subtype
of an object O<sub>2</sub> if it has more properties
than O<sub>2</sub> and all common properties are
pairwise subtypes.isSubtype in class ProxyObjectTypethis <: thatpublic TemplateTypeMap getTemplateTypeMap()
JSTypegetTemplateTypeMap in class ProxyObjectTypepublic boolean hasAnyTemplateTypesInternal()
hasAnyTemplateTypesInternal in class ProxyObjectTypepublic ObjectType getReferencedType()
Copyright © 2009-2014 Google. All Rights Reserved.