Class ConstructorResolutionLogic
- java.lang.Object
-
- com.github.javaparser.resolution.logic.ConstructorResolutionLogic
-
public class ConstructorResolutionLogic extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConstructorResolutionLogic()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static ResolvedType
findCommonType(java.util.List<ResolvedType> variadicValues)
static SymbolReference<ResolvedConstructorDeclaration>
findMostApplicable(java.util.List<ResolvedConstructorDeclaration> constructors, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver)
static SymbolReference<ResolvedConstructorDeclaration>
findMostApplicable(java.util.List<ResolvedConstructorDeclaration> constructors, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean wildcardTolerance)
private static java.util.List<ResolvedType>
groupVariadicParamValues(java.util.List<ResolvedType> argumentsTypes, int startVariadic, ResolvedType variadicType)
static boolean
isApplicable(ResolvedConstructorDeclaration constructor, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver)
private static boolean
isApplicable(ResolvedConstructorDeclaration constructor, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean withWildcardTolerance)
private static boolean
isMoreSpecific(ResolvedConstructorDeclaration constructorA, ResolvedConstructorDeclaration constructorB, TypeSolver typeSolver)
-
-
-
Method Detail
-
groupVariadicParamValues
private static java.util.List<ResolvedType> groupVariadicParamValues(java.util.List<ResolvedType> argumentsTypes, int startVariadic, ResolvedType variadicType)
-
findCommonType
private static ResolvedType findCommonType(java.util.List<ResolvedType> variadicValues)
-
isApplicable
public static boolean isApplicable(ResolvedConstructorDeclaration constructor, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver)
-
isApplicable
private static boolean isApplicable(ResolvedConstructorDeclaration constructor, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean withWildcardTolerance)
-
findMostApplicable
public static SymbolReference<ResolvedConstructorDeclaration> findMostApplicable(java.util.List<ResolvedConstructorDeclaration> constructors, java.util.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(java.util.List<ResolvedConstructorDeclaration> constructors, java.util.List<ResolvedType> argumentsTypes, TypeSolver typeSolver, boolean wildcardTolerance)
-
isMoreSpecific
private static boolean isMoreSpecific(ResolvedConstructorDeclaration constructorA, ResolvedConstructorDeclaration constructorB, TypeSolver typeSolver)
-
-