Class ConstructorResolutionLogic
java.lang.Object
com.github.javaparser.resolution.logic.ConstructorResolutionLogic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ResolvedType
findCommonType
(List<ResolvedType> variadicValues) findMostApplicable
(List<ResolvedConstructorDeclaration> constructors, List<ResolvedType> argumentsTypes, TypeSolver typeSolver) findMostApplicable
(List<ResolvedConstructorDeclaration> constructors, List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean wildcardTolerance) private static List
<ResolvedType> groupVariadicParamValues
(List<ResolvedType> argumentsTypes, int startVariadic, ResolvedType variadicType) static boolean
isApplicable
(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, TypeSolver typeSolver) private static boolean
isApplicable
(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean withWildcardTolerance) private static boolean
isMoreSpecific
(ResolvedConstructorDeclaration constructorA, ResolvedConstructorDeclaration constructorB, TypeSolver typeSolver)
-
Constructor Details
-
ConstructorResolutionLogic
public ConstructorResolutionLogic()
-
-
Method Details
-
groupVariadicParamValues
private static List<ResolvedType> groupVariadicParamValues(List<ResolvedType> argumentsTypes, int startVariadic, ResolvedType variadicType) -
findCommonType
-
isApplicable
public static boolean isApplicable(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, TypeSolver typeSolver) -
isApplicable
private static boolean isApplicable(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean withWildcardTolerance) -
findMostApplicable
public static SymbolReference<ResolvedConstructorDeclaration> findMostApplicable(List<ResolvedConstructorDeclaration> constructors, List<ResolvedType> argumentsTypes, TypeSolver typeSolver) - Parameters:
constructors
- we expect the methods to be ordered such that inherited methods are later in the listargumentsTypes
-typeSolver
-- Returns:
-
findMostApplicable
public static SymbolReference<ResolvedConstructorDeclaration> findMostApplicable(List<ResolvedConstructorDeclaration> constructors, List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean wildcardTolerance) -
isMoreSpecific
private static boolean isMoreSpecific(ResolvedConstructorDeclaration constructorA, ResolvedConstructorDeclaration constructorB, TypeSolver typeSolver)
-