public interface FunctionTypeI extends TypeI
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsArguments(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.
|
Collection<ObjectTypeI> |
getAncestorInterfaces() |
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.
|
Iterable<TypeI> |
getParameterTypes() |
ObjectTypeI |
getPrototypeProperty() |
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.
|
Iterable<FunctionTypeI> |
getSubTypes()
Returns an iterable of direct types that are subtypes of this type.
|
TypeI |
getTypeOfThis()
Gets the type of
this in this function. |
Collection<String> |
getTypeParameters()
Returns the names of all type parameters.
|
boolean |
hasInstanceType()
Returns whether
this type represents a constructor. |
boolean |
hasProperties() |
void |
setSource(Node n) |
autobox, autoboxAndGetObject, containsArray, getDisplayName, getEnumeratedTypeOfEnumElement, getGreatestSubtypeWithProperty, getJSDocInfo, getUnionMembers, hasUninstantiatedTypeVariables, isBooleanValueType, isBottom, isBoxableScalar, isConstructor, isEnumElement, isEnumObject, isEquivalentTo, isFunctionType, isGenericObjectType, isInstanceofObject, isInterface, isLiteralObject, isNullable, isNullType, isNumberValueType, isObjectType, isPrototypeObject, isRecordType, isSomeUnknownType, isStringValueType, isStructuralInterface, isSubtypeOf, isSubtypeWithoutStructuralTyping, isTop, isTypeVariable, isUnionType, isUnknownType, isUnresolved, isUnresolvedOrResolvedUnknown, isVoidable, isVoidType, meetWith, restrictByNotNullOrUndefined, toAnnotationString, toMaybeFunctionType, toMaybeObjectType, toNonNullAnnotationStringTypeI convertMethodToFunction()
boolean hasInstanceType()
this type represents a constructor.ObjectTypeI getInstanceType()
this constructor,
or null if this is not a constructor.TypeI getReturnType()
String getReferenceName()
Node getSource()
Iterable<FunctionTypeI> getSubTypes()
TypeI getTypeOfThis()
this in this function.boolean hasProperties()
void setSource(Node n)
boolean acceptsArguments(List<? extends TypeI> argumentTypes)
Collection<ObjectTypeI> getAncestorInterfaces()
ObjectTypeI getPrototypeProperty()
int getMinArity()
int getMaxArity()
Collection<String> getTypeParameters()
Copyright © 2009-2017 Google. All Rights Reserved.