Class InvocationType
java.lang.Object
org.checkerframework.framework.util.typeinference8.types.InvocationType
A method type for an invocation of a method or constructor.
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationType(AnnotatedTypeMirror.AnnotatedExecutableType annotatedExecutableType, ExecutableType methodType, ExpressionTree invocation, Java8InferenceContext context) Creates an invocation type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotated method type.List<? extends AnnotatedTypeMirror.AnnotatedTypeVariable> Returns the annotated type variables.Returns the method or constructor invocation.Returns the java method type.getParameterTypes(Theta map) Returns the parameter types.getParameterTypes(Theta map, int size) Returns a list of the parameter types ofInvocationTypewhere the vararg parameter has been modified to match the arguments inexpression.getReturnType(Theta map) Returns the return type.List<? extends AbstractType> getThrownTypes(Theta map) Returns the thrown types.List<? extends TypeVariable> Returns the type variables.booleanWhether this method has type variables.booleanisVoid()Whether this method is void.
-
Constructor Details
-
InvocationType
public InvocationType(AnnotatedTypeMirror.AnnotatedExecutableType annotatedExecutableType, ExecutableType methodType, ExpressionTree invocation, Java8InferenceContext context) Creates an invocation type.- Parameters:
annotatedExecutableType- annotated method typemethodType- java method typeinvocation- a method or constructor invocationcontext- the context
-
-
Method Details
-
getInvocation
Returns the method or constructor invocation.- Returns:
- the method or constructor invocation
-
getJavaType
Returns the java method type.- Returns:
- the java method type
-
getThrownTypes
Returns the thrown types.- Parameters:
map- a mapping from type variable to inference variable- Returns:
- the thrown types
-
getReturnType
Returns the return type.- Parameters:
map- a mapping from type variable to inference variable- Returns:
- the return type
-
getParameterTypes
Returns a list of the parameter types ofInvocationTypewhere the vararg parameter has been modified to match the arguments inexpression.- Parameters:
map- a mapping from type variable to inference variablesize- the number of parameters to return; used to expand the vararg- Returns:
- a list of the parameter types of
InvocationTypewhere the vararg parameter has been modified to match the arguments inexpression
-
getParameterTypes
Returns the parameter types. (Varags are not expanded.)- Parameters:
map- a mapping from type variable to inference variable- Returns:
- the parameter types
-
hasTypeVariables
public boolean hasTypeVariables()Whether this method has type variables.- Returns:
- whether this method has type variables
-
getAnnotatedTypeVariables
Returns the annotated type variables.- Returns:
- the annotated type variables
-
getTypeVariables
Returns the type variables.- Returns:
- the type variables
-
isVoid
public boolean isVoid()Whether this method is void.- Returns:
- whether this method is void
-
getAnnotatedType
Returns the annotated method type.- Returns:
- the annotated method type
-