Class TypeInference

java.lang.Object
com.github.javaparser.symbolsolver.resolution.typeinference.TypeInference

public class TypeInference extends Object
The API exposed by the TypeInference subsystem.
Author:
Federico Tomassetti
  • Constructor Summary

    Constructors
    Constructor
    Description
    TypeInference(com.github.javaparser.resolution.TypeSolver typeSolver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    functionalInterfaceParameterizationInference(com.github.javaparser.ast.expr.LambdaExpr lambdaExpr, com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration interfaceDeclaration)
     
    instantiationInference(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
    Public instance methods
    instantiationInference(List<com.github.javaparser.ast.expr.Expression> argumentExpressions, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
     
    boolean
    invocationApplicabilityInference(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
    Determine whether a potentially applicable generic method m is applicable for a method invocation that provides no explicit type arguments.
    void
     
     
    boolean
    moreSpecificMethodInference(com.github.javaparser.ast.expr.MethodCallExpr methodCall, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration m1, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration m2)
    Return if m2 is more specific than m1
    static com.github.javaparser.resolution.MethodUsage
    toMethodUsage(com.github.javaparser.ast.expr.MethodCallExpr call, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration, com.github.javaparser.resolution.TypeSolver typeSolver)
    Public static methods

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TypeInference

      public TypeInference(com.github.javaparser.resolution.TypeSolver typeSolver)
  • Method Details

    • toMethodUsage

      public static com.github.javaparser.resolution.MethodUsage toMethodUsage(com.github.javaparser.ast.expr.MethodCallExpr call, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration, com.github.javaparser.resolution.TypeSolver typeSolver)
      Public static methods
    • instantiationInference

      public Optional<InstantiationSet> instantiationInference(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
      Public instance methods
    • instantiationInference

      public Optional<InstantiationSet> instantiationInference(List<com.github.javaparser.ast.expr.Expression> argumentExpressions, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
    • invocationApplicabilityInference

      public boolean invocationApplicabilityInference(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
      Determine whether a potentially applicable generic method m is applicable for a method invocation that provides no explicit type arguments.
    • invocationTypeInferenceBoundsSetB3

      public BoundSet invocationTypeInferenceBoundsSetB3()
    • invocationTypeInference

      public void invocationTypeInference()
    • functionalInterfaceParameterizationInference

      public void functionalInterfaceParameterizationInference(com.github.javaparser.ast.expr.LambdaExpr lambdaExpr, com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration interfaceDeclaration)
    • moreSpecificMethodInference

      public boolean moreSpecificMethodInference(com.github.javaparser.ast.expr.MethodCallExpr methodCall, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration m1, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration m2)
      Return if m2 is more specific than m1
      Parameters:
      methodCall -
      m1 -
      m2 -