public interface ObjectTypeI extends TypeI
TypeI.Nullability, TypeI.TypeInference| Modifier and Type | Method and Description |
|---|---|
FunctionTypeI |
getConstructor()
Gets this object's constructor, or null if it is a native
object (constructed natively vs.
|
TypeI |
getEnumeratedTypeOfEnumObject()
If this type is an enum object, returns the declared type of the elements.
|
TypeI |
getLegacyResolvedType()
Only called on instances of NamedType.
|
FunctionTypeI |
getOwnerFunction()
If this type represents the object in a function's prototype property, return that function.
|
Node |
getOwnPropertyDefSite(String propertyName) |
JSDocInfo |
getOwnPropertyJSDocInfo(String propertyName)
TODO(dimvar): rename methods in this file that use the phrase OwnProp to NonInheritedProp,
to avoid ambiguity with the built-in methods such as hasOwnProperty, which have
different semantics.
|
Iterable<String> |
getOwnPropertyNames()
Return the names of all non-inherited properties of this type, including prototype properties.
|
Node |
getPropertyDefSite(String propertyName) |
JSDocInfo |
getPropertyJSDocInfo(String propertyName) |
Set<String> |
getPropertyNames()
Returns a set of properties defined or inferred on this type or any of its supertypes.
|
TypeI |
getPropertyType(String propName)
Returns the type of property propName on this object, or null if the property doesn't exist.
|
ObjectTypeI |
getPrototypeObject()
Returns the __proto__ object of this object type, NOT the ".prototype" property.
|
ObjectTypeI |
getRawType()
If this type is not generic, return as is.
|
FunctionTypeI |
getSuperClassConstructor() |
com.google.common.collect.ImmutableList<? extends TypeI> |
getTemplateTypes()
For an instantiated generic type, return the types that the type variables are mapped to.
|
ObjectTypeI |
getTopDefiningInterface(String propName)
Given an interface and a property, finds a top-most super interface
that has the property defined (including this interface).
|
boolean |
hasOwnProperty(String propertyName) |
boolean |
hasProperty(String propertyName) |
ObjectTypeI |
instantiateGenericsWithUnknown()
When this type represents an instance of a generic class/interface Foo, return an instance
of Foo with type parameters mapped to the unknown type.
|
boolean |
isAmbiguousObject()
Returns true if this object is an anonymous object or function type (i.e.
|
boolean |
isInstanceType()
Whether this type is an instance object of some constructor.
|
boolean |
isLegacyNamedType()
The old type checker uses NamedType to wrap types (e.g., defined by typedefs), and to represent
unresolved forward declares.
|
ObjectTypeI |
normalizeObjectForCheckAccessControls()
Works around the OTI distinction between prototype-object types and other objects.
|
autobox, autoboxAndGetObject, containsArray, getDisplayName, getEnumeratedTypeOfEnumElement, getGreatestSubtypeWithProperty, getJSDocInfo, getTypeParameters, getUnionMembers, isBooleanValueType, isBottom, isBoxableScalar, isConstructor, isEnumElement, isEnumObject, isEquivalentTo, isFullyInstantiated, isFunctionType, isGenericObjectType, isInstanceofObject, isInterface, isLiteralObject, isNullable, isNullType, isNumberValueType, isObjectType, isPartiallyInstantiated, isPrototypeObject, isRecordType, isSomeUnknownType, isStringValueType, isStructuralInterface, isSubtypeOf, isSubtypeWithoutStructuralTyping, isTop, isTypeVariable, isUnionType, isUnknownType, isUnresolved, isUnresolvedOrResolvedUnknown, isVoidable, isVoidType, meetWith, restrictByNotNullOrUndefined, toAnnotationString, toMaybeFunctionType, toMaybeObjectType, typeInferenceFunctionTypeI getConstructor()
FunctionTypeI getSuperClassConstructor()
ObjectTypeI getPrototypeObject()
JSDocInfo getOwnPropertyJSDocInfo(String propertyName)
boolean isInstanceType()
ObjectTypeI getRawType()
com.google.common.collect.ImmutableList<? extends TypeI> getTemplateTypes()
ObjectTypeI instantiateGenericsWithUnknown()
boolean hasProperty(String propertyName)
boolean hasOwnProperty(String propertyName)
Iterable<String> getOwnPropertyNames()
ObjectTypeI normalizeObjectForCheckAccessControls()
boolean isAmbiguousObject()
boolean isLegacyNamedType()
TypeI getLegacyResolvedType()
ObjectTypeI getTopDefiningInterface(String propName)
FunctionTypeI getOwnerFunction()
TypeI getPropertyType(String propName)
TypeI getEnumeratedTypeOfEnumObject()
Copyright © 2009-2017 Google. All Rights Reserved.