Class TemplatizedType
java.lang.Object
com.google.javascript.rhino.jstype.JSType
com.google.javascript.rhino.jstype.ObjectType
com.google.javascript.rhino.jstype.ProxyObjectType
com.google.javascript.rhino.jstype.TemplatizedType
An object type with declared template types, such as
Array<string>.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.javascript.rhino.jstype.JSType
JSType.HasPropertyKind, JSType.Nullability, JSType.SubtypingMode, JSType.TypePair, JSType.WithSourceRef -
Field Summary
Fields inherited from class com.google.javascript.rhino.jstype.JSType
templateTypeMap -
Method Summary
Modifier and TypeMethodDescriptionGets the interfaces extended by the interface associated with this type.Gets the interfaces implemented by the ctor associated with this type.@Nullable JSTypegetPropertyType(String propertyName) Gets the property type of the property whose name is given.Returns the template type map associated with this type.com.google.common.collect.ImmutableList<JSType> Gets the declared default element type.booleanDowncasts this to a TemplatizedType, or returns null if this is not a templatized type.<T> TVisit this type with the given visitor.Methods inherited from class com.google.javascript.rhino.jstype.ProxyObjectType
canBeCalled, collapseUnion, findPropertyTypeWithoutConsideringTemplateTypes, getConstructor, getImplicitPrototype, getJSDocInfo, getOwnerFunction, getPropertyKind, getReferenceName, getTemplateParamCount, getTypeOfThis, isAllType, isCheckedUnknownType, isConstructor, isDict, isInstanceType, isInterface, isNativeObjectType, isNominalType, isNoObjectType, isNoResolvedType, isNoType, isNullable, isOrdinaryFunction, isStruct, isStructuralType, isUnknownType, isVoidable, loosenTypecheckingDueToForwardReferencedSupertype, matchConstraint, matchesNumberContext, matchesObjectContext, matchesStringContext, matchesSymbolContext, setJSDocInfo, setPropertyJSDocInfo, setValidator, testForEquality, toMaybeEnumElementType, toMaybeEnumType, toMaybeFunctionType, toMaybeRecordType, toMaybeTemplateType, toMaybeUnionType, visitReferenceTypeMethods inherited from class com.google.javascript.rhino.jstype.ObjectType
cast, clearCachedValues, createDelegateSuffix, defineDeclaredProperty, defineInferredProperty, defineSynthesizedProperty, findClosestDefinition, getClosestDefiningType, getDisplayName, getEnumeratedTypeOfEnumObject, getImplicitPrototypeChain, getNormalizedReferenceName, getOwnPropertyDefSite, getOwnPropertyJSDocInfo, getOwnPropertyKind, getOwnPropertyNames, getOwnSlot, getPossibleToBooleanOutcomes, getPropertiesCount, getPropertyDefSite, getPropertyJSDocInfo, getPropertyNames, getPropertyNode, getPropertyTypeMap, getRawType, getSlot, getSuperClassConstructor, hasCachedValues, hasOwnDeclaredProperty, hasOwnProperty, hasReferenceName, isFunctionPrototypeType, isObject, isPropertyInExterns, isPropertyTypeDeclared, isPropertyTypeInferred, setPropertyNodeMethods inherited from class com.google.javascript.rhino.jstype.JSType
areSimilar, assertFunctionType, assertObjectType, autobox, autoboxesTo, canCastTo, canTestForEqualityWith, canTestForShallowEqualityWith, containsReferenceAncestor, dereference, differsFrom, equals, findPropertyType, getEnumeratedTypeOfEnumElement, getGreatestSubtype, getLeastSupertype, getPropertyKind, getRestrictedTypeGivenOutcome, getTypeParameters, getTypesUnderEquality, getTypesUnderInequality, getTypesUnderShallowEquality, getTypesUnderShallowInequality, getUnionMembers, hasAnyTemplateTypes, hasDisplayName, hashCode, hasProperty, isArrayType, isBigIntObjectType, isBigIntOrNumber, isBigIntValueType, isBooleanObjectType, isBooleanValueType, isBoxableScalar, isDateType, isEmptyType, isEnumElementType, isEnumType, isExplicitlyVoidable, isFunctionType, isGlobalThisType, isLiteralObject, isNamedType, isNominalConstructorOrInterface, isNullType, isNumber, isNumberObjectType, isNumberValueType, isObjectType, isOnlyBigInt, isRawTypeOfTemplatizedType, isReadonlyArrayType, isRecordType, isRegexpType, isResolved, isSomeUnknownType, isString, isStringObjectType, isStringValueType, isStructuralInterface, isSubtype, isSubtype, isSubtypeOf, isSubtypeOf, isSubtypeWithoutStructuralTyping, isSuccessfullyResolved, isSymbol, isSymbolObjectType, isSymbolValueType, isTemplateType, isTemplatizedType, isUnionType, isUnsuccessfullyResolved, isVoidType, mergeSupertypeTemplateTypes, resolve, restrictByNotNull, restrictByNotNullOrUndefined, restrictByNotUndefined, toAnnotationString, toMaybeFunctionType, toMaybeNamedType, toMaybeObjectType, toObjectType, toString
-
Method Details
-
getCtorImplementedInterfaces
Description copied from class:ObjectTypeGets the interfaces implemented by the ctor associated with this type. Intended to be overridden by subclasses.- Overrides:
getCtorImplementedInterfacesin classProxyObjectType
-
getCtorExtendedInterfaces
Description copied from class:ObjectTypeGets the interfaces extended by the interface associated with this type. Intended to be overridden by subclasses.- Overrides:
getCtorExtendedInterfacesin classProxyObjectType
-
visit
Description copied from class:JSTypeVisit this type with the given visitor.- Overrides:
visitin classProxyObjectType- Returns:
- the value returned by the visitor
- See Also:
-
toMaybeTemplatizedType
Description copied from class:JSTypeDowncasts this to a TemplatizedType, or returns null if this is not a templatized type.- Overrides:
toMaybeTemplatizedTypein classProxyObjectType
-
getTemplateTypes
Description copied from class:ObjectTypeGets the declared default element type.- Overrides:
getTemplateTypesin classProxyObjectType- See Also:
-
getPropertyType
Description copied from class:ObjectTypeGets the property type of the property whose name is given. If the underlying object does not have this property, the Unknown type is returned to indicate that no information is available on this property. This gets overridden by FunctionType for lazily-resolved call() and bind() functions.- Overrides:
getPropertyTypein classObjectType- Returns:
- the property's type or
UnknownType. This method never returnsnull.
-
getTemplateTypeMap
Description copied from class:JSTypeReturns the template type map associated with this type.- Overrides:
getTemplateTypeMapin classProxyObjectType
-
hasAnyTemplateTypesInternal
public boolean hasAnyTemplateTypesInternal()- Overrides:
hasAnyTemplateTypesInternalin classProxyObjectType
-
getReferencedType
- Returns:
- The referenced ObjectType wrapped by this TemplatizedType.
-