public interface FunctionTypeI extends ObjectTypeI
| Modifier and Type | Interface and Description |
|---|---|
static interface |
FunctionTypeI.Builder
Interface for building FunctionTypeI instances.
|
TypeI.Nullability, TypeI.TypeInference| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsArguments(java.util.List<? extends TypeI> argumentTypes)
Checks if a call to this function with the given list of arguments is valid.
|
TypeI |
convertMethodToFunction()
Creates a new function type B based on the original function type A.
|
java.util.Collection<ObjectTypeI> |
getAncestorInterfaces() |
java.lang.Iterable<FunctionTypeI> |
getDirectSubTypes()
Returns an iterable of direct types that are subtypes of this type.
|
ObjectTypeI |
getInstanceType()
Returns a type representing an instance of
this constructor,
or null if this is not a constructor. |
int |
getMaxArity()
Returns the maximum number of allowed arguments, or Integer.MAX_VALUE if variadic.
|
int |
getMinArity()
Returns the number of required arguments.
|
java.lang.Iterable<TypeI> |
getParameterTypes() |
ObjectTypeI |
getPrototypeProperty() |
java.lang.String |
getReferenceName()
For a constructor function, returns the name of the instances.
|
TypeI |
getReturnType() |
Node |
getSource()
Gets the AST Node where this function was defined.
|
TypeI |
getTypeOfThis()
Gets the type of
this in this function. |
boolean |
hasInstanceType()
Returns whether
this type represents a constructor. |
boolean |
hasProperties()
Whether this function type has any properties (not counting "prototype").
|
void |
setSource(Node n) |
FunctionTypeI.Builder |
toBuilder()
Returns a Builder instance initialized to this function.
|
getConstructor, getEnumeratedTypeOfEnumObject, getInstantiatedTypeArgument, getLegacyResolvedType, getOwnerFunction, getOwnPropertyDefSite, getOwnPropertyJSDocInfo, getOwnPropertyNames, getPropertyDefSite, getPropertyJSDocInfo, getPropertyNames, getPropertyType, getPrototypeObject, getRawType, getSuperClassConstructor, getTemplateTypes, getTopDefiningInterface, hasOwnProperty, hasProperty, instantiateGenericsWithUnknown, isAmbiguousObject, isInstanceType, isLegacyNamedType, normalizeObjectForCheckAccessControls, withoutStrayPropertiesautobox, 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, typeInferenceTypeI convertMethodToFunction()
boolean hasInstanceType()
this type represents a constructor.ObjectTypeI getInstanceType()
this constructor,
or null if this is not a constructor.TypeI getReturnType()
java.lang.String getReferenceName()
Node getSource()
java.lang.Iterable<FunctionTypeI> getDirectSubTypes()
TypeI getTypeOfThis()
this in this function.boolean hasProperties()
void setSource(Node n)
boolean acceptsArguments(java.util.List<? extends TypeI> argumentTypes)
java.util.Collection<ObjectTypeI> getAncestorInterfaces()
ObjectTypeI getPrototypeProperty()
java.lang.Iterable<TypeI> getParameterTypes()
int getMinArity()
int getMaxArity()
FunctionTypeI.Builder toBuilder()
Copyright © 2009-2018 Google. All Rights Reserved.