public interface TypeI extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
TypeI.Nullability
Specifies how to express nullability of reference types in annotation strings and error
messages.
|
static class |
TypeI.TypeInference
Simple enum to easily identify the type of TypeI instance.
|
| Modifier and Type | Method and Description |
|---|---|
TypeI |
autobox() |
ObjectTypeI |
autoboxAndGetObject() |
boolean |
containsArray() |
String |
getDisplayName() |
TypeI |
getEnumeratedTypeOfEnumElement() |
TypeI |
getGreatestSubtypeWithProperty(String propName) |
JSDocInfo |
getJSDocInfo() |
Collection<TypeI> |
getTypeParameters()
If this type is a generic nominal type or function, return the type parameters as type
variables.
|
Iterable<? extends TypeI> |
getUnionMembers()
If this type is a union type, returns a list of its members.
|
boolean |
isBooleanValueType()
Whether the type is a scalar boolean.
|
boolean |
isBottom() |
boolean |
isBoxableScalar() |
boolean |
isConstructor() |
boolean |
isEnumElement() |
boolean |
isEnumObject() |
boolean |
isEquivalentTo(TypeI type) |
boolean |
isFullyInstantiated()
Returns true if this type is a generic object (non function) and *all* its type variables
are instantiated.
|
boolean |
isFunctionType() |
boolean |
isGenericObjectType()
True if this type represents a generic object (non function) type, instantiated or not.
|
boolean |
isInstanceofObject()
True when the nominal type of this type is Object.
|
boolean |
isInterface() |
boolean |
isLiteralObject() |
boolean |
isNullable() |
boolean |
isNullType() |
boolean |
isNumberValueType()
Whether the type is a scalar number.
|
boolean |
isObjectType() |
boolean |
isPartiallyInstantiated()
Returns true if this type is a generic object (non function) and *some* of its type variables
are instantiated.
|
boolean |
isPrototypeObject() |
boolean |
isRecordType()
Whether this type represents an anonymous structural type, e.g., { a: number, b: string }.
|
boolean |
isSomeUnknownType() |
boolean |
isStringValueType()
Whether the type is a scalar string.
|
boolean |
isStructuralInterface() |
boolean |
isSubtypeOf(TypeI type) |
boolean |
isSubtypeWithoutStructuralTyping(TypeI type) |
boolean |
isTop() |
boolean |
isTypeVariable() |
boolean |
isUnionType() |
boolean |
isUnknownType() |
boolean |
isUnresolved() |
boolean |
isUnresolvedOrResolvedUnknown() |
boolean |
isVoidable() |
boolean |
isVoidType() |
TypeI |
meetWith(TypeI other) |
TypeI |
restrictByNotNullOrUndefined()
If this is a union type, returns a union type that does not include
the null or undefined type.
|
String |
toAnnotationString(TypeI.Nullability nullability)
Returns a string representation of this type, suitable for printing
in type annotations at code generation time.
|
FunctionTypeI |
toMaybeFunctionType()
Downcasts this to a FunctionTypeI, or returns null if this is not
a function.
|
ObjectTypeI |
toMaybeObjectType()
If this type is a single object, downcast it to ObjectTypeI.
|
TypeI.TypeInference |
typeInference()
Returns the type inference of this object.
|
boolean isBottom()
boolean isTop()
boolean isTypeVariable()
boolean isUnresolved()
boolean isBoxableScalar()
TypeI autobox()
boolean isUnresolvedOrResolvedUnknown()
boolean isConstructor()
boolean isEquivalentTo(TypeI type)
boolean isFunctionType()
boolean isInterface()
boolean isStructuralInterface()
boolean isSubtypeOf(TypeI type)
boolean isSubtypeWithoutStructuralTyping(TypeI type)
boolean containsArray()
boolean isUnknownType()
boolean isSomeUnknownType()
boolean isObjectType()
boolean isGenericObjectType()
boolean isInstanceofObject()
boolean isUnionType()
boolean isNullable()
boolean isVoidable()
boolean isNullType()
boolean isVoidType()
boolean isPrototypeObject()
boolean isLiteralObject()
boolean isEnumElement()
boolean isStringValueType()
boolean isRecordType()
boolean isNumberValueType()
boolean isBooleanValueType()
ObjectTypeI autoboxAndGetObject()
JSDocInfo getJSDocInfo()
TypeI restrictByNotNullOrUndefined()
FunctionTypeI toMaybeFunctionType()
ObjectTypeI toMaybeObjectType()
Iterable<? extends TypeI> getUnionMembers()
String getDisplayName()
TypeI getEnumeratedTypeOfEnumElement()
boolean isEnumObject()
boolean isFullyInstantiated()
boolean isPartiallyInstantiated()
Collection<TypeI> getTypeParameters()
String toAnnotationString(TypeI.Nullability nullability)
TypeI.TypeInference typeInference()
Copyright © 2009-2017 Google. All Rights Reserved.