Class DefaultTypeArgumentInference
java.lang.Object
org.checkerframework.framework.util.typeinference8.DefaultTypeArgumentInference
- All Implemented Interfaces:
TypeArgumentInference
Implementation of type argument inference.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioninferTypeArgs
(AnnotatedTypeFactory typeFactory, ExpressionTree expressionTree, AnnotatedTypeMirror.AnnotatedExecutableType methodType) Infer the type arguments for the method or constructor invocation given by invocation.static ExpressionTree
outerInference
(ExpressionTree tree, @Nullable TreePath parentPath) Returns the outermost tree required to find the type oftree
.
-
Constructor Details
-
DefaultTypeArgumentInference
public DefaultTypeArgumentInference()Creates a DefaultTypeArgumentInference.
-
-
Method Details
-
inferTypeArgs
public InferenceResult inferTypeArgs(AnnotatedTypeFactory typeFactory, ExpressionTree expressionTree, AnnotatedTypeMirror.AnnotatedExecutableType methodType) Description copied from interface:TypeArgumentInference
Infer the type arguments for the method or constructor invocation given by invocation.- Specified by:
inferTypeArgs
in interfaceTypeArgumentInference
- Parameters:
typeFactory
- the type factory used to create methodTypeexpressionTree
- a tree representing the method or constructor invocation for which we are inferring type argumentsmethodType
- the declaration type of method elem- Returns:
- the result which includes the inferred type arguments or an error message if they were not inferred.
-
outerInference
Returns the outermost tree required to find the type oftree
.- Parameters:
tree
- tree that may need an outer tree to find the typeparentPath
- path to the parent oftree
or null if no such parent exists- Returns:
- the outermost tree required to find the type of
tree
-