public final class TemplateType extends ProxyObjectType
TemplateTypeMaps.JSType.HasPropertyKind, JSType.Nullability, JSType.SubtypingMode, JSType.TypePairtemplateTypeMap| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCycle()
This function returns whether or not there is a cycle in the reference chain of this type.
|
boolean |
equals(java.lang.Object jsType) |
JSType |
getBound() |
java.lang.String |
getReferenceName()
Gets the reference name for this object.
|
Node |
getTypeTransformation() |
boolean |
hasAnyTemplateTypesInternal() |
boolean |
isTypeTransformation() |
void |
setBound(JSType bound) |
boolean |
setValidator(com.google.common.base.Predicate<JSType> validator)
Certain types have constraints on them at resolution-time.
|
TemplateType |
toMaybeTemplateType()
Downcasts this to a TemplateType, or returns null if this is not
a function.
|
<T> T |
visit(Visitor<T> visitor)
Visit this type with the given visitor.
|
canBeCalled, collapseUnion, findPropertyTypeWithoutConsideringTemplateTypes, getConstructor, getCtorExtendedInterfaces, getCtorImplementedInterfaces, getImplicitPrototype, getJSDocInfo, getOwnerFunction, getPropertyKind, getTemplateParamCount, getTemplateTypeMap, getTemplateTypes, getTypeOfThis, isAllType, isCheckedUnknownType, isConstructor, isDict, isInstanceType, isInterface, isNativeObjectType, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isOrdinaryFunction, isStruct, isStructuralType, isUnknownType, isVoidable, matchConstraint, matchesNumberContext, matchesObjectContext, matchesStringContext, matchesSymbolContext, removeProperty, setJSDocInfo, setPropertyJSDocInfo, testForEquality, toDebugHashCodeString, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeRecordType, toMaybeTemplatizedType, toMaybeUnionType, visitReferenceTypecast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineInferredProperty, defineSynthesizedProperty, findClosestDefinition, getClosestDefiningType, getDisplayName, getEnumeratedTypeOfEnumObject, getImplicitPrototypeChain, getNormalizedReferenceName, getOwnPropertyDefSite, getOwnPropertyJSDocInfo, getOwnPropertyKind, getOwnPropertyNames, getOwnSlot, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyDefSite, getPropertyJSDocInfo, getPropertyNames, getPropertyNode, getPropertyType, getPropertyTypeMap, getRawType, getSlot, getSuperClassConstructor, getTopMostDefiningType, hasCachedValues, hasOwnProperty, hasReferenceName, isAmbiguousObject, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeInferred, setPropertyNodeassertFunctionType, assertObjectType, autobox, autoboxesTo, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, containsReferenceAncestor, dereference, differsFrom, findPropertyType, getEnumeratedTypeOfEnumElement, getGreatestSubtype, getGreatestSubtypeWithProperty, getLeastSupertype, getPropertyKind, getRestrictedTypeGivenToBooleanOutcome, getTypeParameters, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, getUnionMembers, hasAnyTemplateTypes, hasDisplayName, hashCode, hasProperty, isArrayType, isBooleanObjectType, isBooleanValueType, isBoxableScalar, isDateType, isEmptyType, isEnumElementType, isEnumType, isEquivalent, isEquivalentTo, isEquivalentTo, isExplicitlyVoidable, isFunctionType, isGlobalThisType, isLiteralObject, isNamedType, isNominalConstructor, isNullType, isNumber, isNumberObjectType, isNumberValueType, isObjectType, isRawTypeOfTemplatizedType, isRecordType, isRegexpType, isResolved, isSomeUnknownType, isString, isStringObjectType, isStringValueType, isStructuralInterface, isSubtype, isSubtype, isSubtypeOf, isSubtypeOf, isSubtypeWithoutStructuralTyping, isSuccessfullyResolved, isSymbol, isSymbolObjectType, isSymbolValueType, isTemplateType, isTemplatizedType, isTypeVariable, isUnionType, isUnresolved, isUnresolvedOrResolvedUnknown, isUnsuccessfullyResolved, isVoidType, mergeSupertypeTemplateTypes, resolve, restrictByNotNull, restrictByNotNullOrUndefined, restrictByNotUndefined, toAnnotationString, toMaybeFunctionType, toMaybeNamedType, toMaybeObjectType, toObjectType, toString, unboxesTopublic java.lang.String getReferenceName()
ObjectTypeReturning an empty string means something different than returning null. An empty string may
indicate an anonymous constructor, which we treat differently than a literal type without a
reference name. e.g. in InstanceObjectType.appendTo(StringBuilder, boolean)
getReferenceName in class ProxyObjectTypenull if this is an anonymous objectpublic TemplateType toMaybeTemplateType()
JSTypetoMaybeTemplateType in class ProxyObjectTypepublic boolean hasAnyTemplateTypesInternal()
hasAnyTemplateTypesInternal in class ProxyObjectTypepublic <T> T visit(Visitor<T> visitor)
JSTypevisit in class ProxyObjectTypeVisitorpublic boolean isTypeTransformation()
public Node getTypeTransformation()
public JSType getBound()
public void setBound(JSType bound)
public boolean setValidator(com.google.common.base.Predicate<JSType> validator)
JSType@extends annotation must be an
object. Clients should inject a validator that emits a warning
if the type does not validate, and return false.setValidator in class ProxyObjectTypepublic boolean containsCycle()
Copyright © 2009-2019 Google. All Rights Reserved.