Class DefaultTypeArgumentInference

java.lang.Object
org.checkerframework.framework.util.typeinference8.DefaultTypeArgumentInference
All Implemented Interfaces:
TypeArgumentInference

public class DefaultTypeArgumentInference extends Object implements TypeArgumentInference
Implementation of type argument inference.
  • 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 interface TypeArgumentInference
      Parameters:
      typeFactory - the type factory used to create methodType
      expressionTree - a tree representing the method or constructor invocation for which we are inferring type arguments
      methodType - 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

      public static ExpressionTree outerInference(ExpressionTree tree, @Nullable TreePath parentPath)
      Returns the outermost tree required to find the type of tree.
      Parameters:
      tree - tree that may need an outer tree to find the type
      parentPath - path to the parent of tree or null if no such parent exists
      Returns:
      the outermost tree required to find the type of tree