Class MethodResolutionLogic
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.MethodResolutionLogic
-
public class MethodResolutionLogic extends Object
- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description MethodResolutionLogic()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
findMostApplicable(List<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
findMostApplicable(List<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver, boolean wildcardTolerance)
static Optional<com.github.javaparser.resolution.MethodUsage>
findMostApplicableUsage(List<com.github.javaparser.resolution.MethodUsage> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static boolean
isApplicable(com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration method, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static boolean
isApplicable(com.github.javaparser.resolution.MethodUsage method, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static boolean
isAssignableMatchTypeParameters(com.github.javaparser.resolution.types.ResolvedReferenceType expected, com.github.javaparser.resolution.types.ResolvedReferenceType actual, Map<String,com.github.javaparser.resolution.types.ResolvedType> matchedParameters)
static boolean
isAssignableMatchTypeParameters(com.github.javaparser.resolution.types.ResolvedType expected, com.github.javaparser.resolution.types.ResolvedType actual, Map<String,com.github.javaparser.resolution.types.ResolvedType> matchedParameters)
protected static boolean
isExactMatch(com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration method, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes)
static com.github.javaparser.resolution.types.ResolvedType
replaceTypeParam(com.github.javaparser.resolution.types.ResolvedType type, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration tp, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
solveMethodInType(com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration typeDeclaration, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes)
static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
solveMethodInType(com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration typeDeclaration, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
-
-
-
Method Detail
-
isApplicable
public static boolean isApplicable(com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration method, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
isAssignableMatchTypeParameters
public static boolean isAssignableMatchTypeParameters(com.github.javaparser.resolution.types.ResolvedType expected, com.github.javaparser.resolution.types.ResolvedType actual, Map<String,com.github.javaparser.resolution.types.ResolvedType> matchedParameters)
-
isAssignableMatchTypeParameters
public static boolean isAssignableMatchTypeParameters(com.github.javaparser.resolution.types.ResolvedReferenceType expected, com.github.javaparser.resolution.types.ResolvedReferenceType actual, Map<String,com.github.javaparser.resolution.types.ResolvedType> matchedParameters)
-
replaceTypeParam
public static com.github.javaparser.resolution.types.ResolvedType replaceTypeParam(com.github.javaparser.resolution.types.ResolvedType type, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration tp, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
isApplicable
public static boolean isApplicable(com.github.javaparser.resolution.MethodUsage method, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
findMostApplicable
public static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> findMostApplicable(List<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
- Parameters:
methods
- we expect the methods to be ordered such that inherited methods are later in the list
-
findMostApplicable
public static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> findMostApplicable(List<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver, boolean wildcardTolerance)
-
isExactMatch
protected static boolean isExactMatch(com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration method, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes)
-
findMostApplicableUsage
public static Optional<com.github.javaparser.resolution.MethodUsage> findMostApplicableUsage(List<com.github.javaparser.resolution.MethodUsage> methods, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
solveMethodInType
public static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethodInType(com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration typeDeclaration, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes)
-
solveMethodInType
public static com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethodInType(com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration typeDeclaration, String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
-
-