Class TypeInference


  • public class TypeInference
    extends java.lang.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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void functionalInterfaceParameterizationInference​(com.github.javaparser.ast.expr.LambdaExpr lambdaExpr, com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration interfaceDeclaration)  
      java.util.Optional<InstantiationSet> instantiationInference​(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)  
      java.util.Optional<InstantiationSet> instantiationInference​(java.util.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 invocationTypeInference()  
      BoundSet invocationTypeInferenceBoundsSetB3()  
      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)  
      • Methods inherited from class java.lang.Object

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

      • TypeInference

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

      • 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)
      • instantiationInference

        public java.util.Optional<InstantiationSet> instantiationInference​(com.github.javaparser.ast.expr.MethodCallExpr methodCallExpr,
                                                                           com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration methodDeclaration)
      • instantiationInference

        public java.util.Optional<InstantiationSet> instantiationInference​(java.util.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 -