Home
last modified time | relevance | path

Searched refs:ResolvedType (Results 1 – 25 of 154) sorted by relevance

1234567

/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/
DDefaultVisitorAdapter.java13 import com.github.javaparser.resolution.types.ResolvedType;
15 public class DefaultVisitorAdapter implements GenericVisitor<ResolvedType, Boolean> {
17 public ResolvedType visit(CompilationUnit node, Boolean aBoolean) { in visit()
22 public ResolvedType visit(PackageDeclaration node, Boolean aBoolean) { in visit()
27 public ResolvedType visit(TypeParameter node, Boolean aBoolean) { in visit()
32 public ResolvedType visit(LineComment node, Boolean aBoolean) { in visit()
37 public ResolvedType visit(BlockComment node, Boolean aBoolean) { in visit()
42 public ResolvedType visit(ClassOrInterfaceDeclaration node, Boolean aBoolean) { in visit()
47 public ResolvedType visit(EnumDeclaration node, Boolean aBoolean) { in visit()
52 public ResolvedType visit(EnumConstantDeclaration node, Boolean aBoolean) { in visit()
[all …]
DTypeExtractor.java21 import com.github.javaparser.resolution.types.ResolvedType;
66 public ResolvedType visit(VariableDeclarator node, Boolean solveLambdas) { in visit()
76 public ResolvedType visit(Parameter node, Boolean solveLambdas) { in visit()
85 public ResolvedType visit(ArrayAccessExpr node, Boolean solveLambdas) { in visit()
86 ResolvedType arrayUsageType = node.getName().accept(this, solveLambdas); in visit()
94 public ResolvedType visit(ArrayCreationExpr node, Boolean solveLambdas) { in visit()
95ResolvedType res = facade.convertToUsage(node.getElementType(), JavaParserFactory.getContext(node,… in visit()
103 public ResolvedType visit(ArrayInitializerExpr node, Boolean solveLambdas) { in visit()
108 public ResolvedType visit(AssignExpr node, Boolean solveLambdas) { in visit()
113 public ResolvedType visit(BinaryExpr node, Boolean solveLambdas) { in visit()
[all …]
DJavaParserFacade.java68 private Map<Node, ResolvedType> cacheWithLambdasSolved = new IdentityHashMap<>();
69 private Map<Node, ResolvedType> cacheWithoutLambdasSolved = new IdentityHashMap<>();
97 …protected static ResolvedType solveGenericTypes(ResolvedType type, Context context, TypeSolver typ… in solveGenericTypes()
104ResolvedType boundResolved = solveGenericTypes(wildcardUsage.getBoundedType(), context, typeSolver… in solveGenericTypes()
140 List<ResolvedType> argumentTypes = new LinkedList<>(); in solve()
152ResolvedType classDecl = JavaParserFacade.get(typeSolver).convert(classNode.getExtendedTypes(0), c… in solve()
198 List<ResolvedType> argumentTypes = new LinkedList<>(); in solve()
203ResolvedType classDecl = JavaParserFacade.get(typeSolver).convert(objectCreationExpr.getType(), ob… in solve()
214 …ments(Node node, NodeList<Expression> args, boolean solveLambdas, List<ResolvedType> argumentTypes, in solveArguments()
240 List<ResolvedType> argumentTypes = new LinkedList<>(); in solve()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/resolution/
DMethodUsage.java27 import com.github.javaparser.resolution.types.ResolvedType;
42 private List<ResolvedType> paramTypes = new ArrayList<>();
43 private List<ResolvedType> exceptionTypes = new ArrayList<>();
44 private ResolvedType returnType;
60 List<ResolvedType> paramTypes, ResolvedType returnType) { in MethodUsage()
65 … MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType re… in MethodUsage()
66 List<ResolvedType> exceptionTypes) { in MethodUsage()
70 … MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType re… in MethodUsage()
71 … List<ResolvedType> exceptionTypes, ResolvedTypeParametersMap typeParametersMap) { in MethodUsage()
99 public ResolvedType returnType() { in returnType()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/
DTypeHelper.java30 public static boolean isProperType(ResolvedType type) { in isProperType()
65 …blic static boolean isCompatibleInAStrictInvocationContext(Expression expression, ResolvedType t) { in isCompatibleInAStrictInvocationContext()
75 …CompatibleInALooseInvocationContext(TypeSolver typeSolver, Expression expression, ResolvedType t) { in isCompatibleInALooseInvocationContext()
86 public static boolean isCompatibleInALooseInvocationContext(ResolvedType s, ResolvedType t) { in isCompatibleInALooseInvocationContext()
136 private static boolean isUnboxable(ResolvedType referenceType) { in isUnboxable()
143 private static ResolvedType toUnboxedType(ResolvedReferenceType referenceType) { in toUnboxedType()
147 private static ResolvedType toBoxedType(ResolvedPrimitiveType primitiveType) { in toBoxedType()
151 …te static boolean areCompatibleThroughWideningReferenceConversion(ResolvedType s, ResolvedType t) { in areCompatibleThroughWideningReferenceConversion()
159 …te static boolean areCompatibleThroughWideningPrimitiveConversion(ResolvedType s, ResolvedType t) { in areCompatibleThroughWideningPrimitiveConversion()
167 public static boolean isInferenceVariable(ResolvedType type) { in isInferenceVariable()
[all …]
DMethodType.java5 import com.github.javaparser.resolution.types.ResolvedType;
22 private List<ResolvedType> formalArgumentTypes;
23 private ResolvedType returnType;
24 private List<ResolvedType> exceptionTypes;
31 …public MethodType(List<ResolvedTypeParameterDeclaration> typeParameters, List<ResolvedType> formal… in MethodType()
32 ResolvedType returnType, in MethodType()
33 List<ResolvedType> exceptionTypes) { in MethodType()
44 public List<ResolvedType> getFormalArgumentTypes() { in getFormalArgumentTypes()
48 public ResolvedType getReturnType() { in getReturnType()
52 public List<ResolvedType> getExceptionTypes() { in getExceptionTypes()
DTypeInference.java9 import com.github.javaparser.resolution.types.ResolvedType;
30 private final ResolvedType object;
101 List<ResolvedType> Fs = formalParameterTypes(methodDeclaration); in instantiationInference()
485 List<ResolvedType> paramTypes = new LinkedList<>(); in instantiationSetToMethodUsage()
489 ResolvedType returnType = instantiationSet.apply(methodDeclaration.getReturnType()); in instantiationSetToMethodUsage()
531 ResolvedType T = bound.getType(); in boundSetup()
536 ResolvedType TWithSubstitutions = substitution.apply(T); in boundSetup()
552 ResolvedType thrownType = methodDeclaration.getSpecifiedException(j); in appearInThrowsClause()
560 private List<ResolvedType> formalParameterTypes(ResolvedMethodDeclaration methodDeclaration) { in formalParameterTypes()
561 List<ResolvedType> types = new LinkedList<>(); in formalParameterTypes()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/contexts/
DMethodCallExprContext.java58 public Optional<ResolvedType> solveGenericType(String name, TypeSolver typeSolver) { in solveGenericType()
60ResolvedType typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope().get()); in solveGenericType()
61 … Optional<ResolvedType> res = typeOfScope.asReferenceType().getGenericParameterByName(name); in solveGenericType()
74 …public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentsTypes, Ty… in solveMethodAsUsage()
95 ResolvedType typeOfScope = JavaParserFacade.get(typeSolver).getType(scope); in solveMethodAsUsage()
98 Map<ResolvedTypeParameterDeclaration, ResolvedType> inferredTypes = new HashMap<>(); in solveMethodAsUsage()
102 ResolvedType originalArgumentType = argumentsTypes.get(i); in solveMethodAsUsage()
103ResolvedType updatedArgumentType = usingParameterTypesFromScope(typeOfScope, originalArgumentType,… in solveMethodAsUsage()
107ResolvedType updatedArgumentType = applyInferredTypes(argumentsTypes.get(i), inferredTypes); in solveMethodAsUsage()
123 final List<ResolvedType> typeArguments = new ArrayList<>(); in resolveMethodTypeParametersFromExplicitList()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/model/typesystem/
DLazyType.java5 import com.github.javaparser.resolution.types.ResolvedType;
10 public class LazyType implements ResolvedType {
11 private ResolvedType concrete;
12 private Function<Void, ResolvedType> provider;
14 public LazyType(Function<Void, ResolvedType> provider) { in LazyType()
18 private ResolvedType getType() { in getType()
106 …public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replace… in replaceTypeVariables()
107 … Map<ResolvedTypeParameterDeclaration, ResolvedType> inferredTypes) { in replaceTypeVariables()
112 …public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replace… in replaceTypeVariables()
117 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/resolution/types/
DResolvedReferenceType.java41 public abstract class ResolvedReferenceType implements ResolvedType,
59 …dReferenceType(ResolvedReferenceTypeDeclaration typeDeclaration, List<ResolvedType> typeArguments)… in ResolvedReferenceType()
154 public abstract ResolvedType transformTypeParameters(ResolvedTypeTransformer transformer); in transformTypeParameters()
157 …public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedTyp… in replaceTypeVariables()
158 … Map<ResolvedTypeParameterDeclaration, ResolvedType> inferredTypes) { in replaceTypeVariables()
165 for (ResolvedType tp : this.typeParametersValues()) { in replaceTypeVariables()
166ResolvedType transformedTp = tp.replaceTypeVariables(tpToReplace, replaced, inferredTypes); in replaceTypeVariables()
173 … List<ResolvedType> typeParametersCorrected = result.asReferenceType().typeParametersValues(); in replaceTypeVariables()
180 List<ResolvedType> values = result.typeParametersValues(); in replaceTypeVariables()
199 public abstract boolean isAssignableBy(ResolvedType other); in isAssignableBy()
[all …]
DResolvedArrayType.java33 public class ResolvedArrayType implements ResolvedType {
35 private ResolvedType baseType;
37 public ResolvedArrayType(ResolvedType baseType) { in ResolvedArrayType()
86 public ResolvedType getComponentType() { in getComponentType()
91 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
104ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType repla… in replaceTypeVariables()
105ResolvedType baseTypeReplaced = baseType.replaceTypeVariables(tpToReplace, replaced, inferredTypes… in replaceTypeVariables()
DResolvedIntersectionType.java34 public class ResolvedIntersectionType implements ResolvedType {
35 private List<ResolvedType> elements;
37 public ResolvedIntersectionType(Collection<ResolvedType> elements) { in ResolvedIntersectionType()
61 …return String.join(" & ", elements.stream().map(ResolvedType::describe).collect(Collectors.toList(… in describe()
65 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
70 …lic ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced, … in replaceTypeVariables()
71 List<ResolvedType> elementsReplaced = elements.stream() in replaceTypeVariables()
DResolvedWildcard.java38 public class ResolvedWildcard implements ResolvedType {
43 private ResolvedType boundedType;
45 private ResolvedWildcard(BoundType type, ResolvedType boundedType) { in ResolvedWildcard()
56 public static ResolvedWildcard superBound(ResolvedType type) { in superBound()
60 public static ResolvedWildcard extendsBound(ResolvedType type) { in extendsBound()
125 public ResolvedType getBoundedType() { in getBoundedType()
133 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
147ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType repla… in replaceTypeVariables()
154ResolvedType boundedTypeReplaced = boundedType.replaceTypeVariables(tpToReplace, replaced, inferre… in replaceTypeVariables()
DResolvedLambdaConstraintType.java24 public class ResolvedLambdaConstraintType implements ResolvedType {
25 private ResolvedType bound;
27 private ResolvedLambdaConstraintType(ResolvedType bound) { in ResolvedLambdaConstraintType()
36 public ResolvedType getBound() { in getBound()
50 public static ResolvedLambdaConstraintType bound(ResolvedType bound){ in bound()
55 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
DResolvedType.java40 public interface ResolvedType { interface
165 …ult ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced, … in replaceTypeVariables()
172 …default ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replac… in replaceTypeVariables()
190 boolean isAssignableBy(ResolvedType other); in isAssignableBy()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/
DMethodResolutionLogic.java47 …private static List<ResolvedType> groupVariadicParamValues(List<ResolvedType> argumentsTypes, int … in groupVariadicParamValues()
48 List<ResolvedType> res = new ArrayList<>(argumentsTypes.subList(0, startVariadic)); in groupVariadicParamValues()
49 … List<ResolvedType> variadicValues = argumentsTypes.subList(startVariadic, argumentsTypes.size()); in groupVariadicParamValues()
54 ResolvedType componentType = findCommonType(variadicValues); in groupVariadicParamValues()
60 private static ResolvedType findCommonType(List<ResolvedType> variadicValues) { in findCommonType()
68 …lean isApplicable(ResolvedMethodDeclaration method, String name, List<ResolvedType> argumentsTypes… in isApplicable()
72 …lean isApplicable(ResolvedMethodDeclaration method, String name, List<ResolvedType> argumentsTypes… in isApplicable()
80 ResolvedType expectedType = method.getLastParam().getType(); in isApplicable()
81 ResolvedType actualType = argumentsTypes.get(pos); in isApplicable()
105 Map<String, ResolvedType> matchedParameters = new HashMap<>(); in isApplicable()
[all …]
DConstructorResolutionLogic.java21 import com.github.javaparser.resolution.types.ResolvedType;
36 …private static List<ResolvedType> groupVariadicParamValues(List<ResolvedType> argumentsTypes, int … in groupVariadicParamValues()
37 ResolvedType variadicType) { in groupVariadicParamValues()
38 List<ResolvedType> res = new ArrayList<>(argumentsTypes.subList(0, startVariadic)); in groupVariadicParamValues()
39 … List<ResolvedType> variadicValues = argumentsTypes.subList(startVariadic, argumentsTypes.size()); in groupVariadicParamValues()
44 ResolvedType componentType = findCommonType(variadicValues); in groupVariadicParamValues()
50 private static ResolvedType findCommonType(List<ResolvedType> variadicValues) { in findCommonType()
58 …boolean isApplicable(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, in isApplicable()
63 …boolean isApplicable(ResolvedConstructorDeclaration constructor, List<ResolvedType> argumentsTypes, in isApplicable()
69 ResolvedType expectedType = constructor.getLastParam().getType(); in isApplicable()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/resolution/types/parametrization/
DResolvedTypeParametersMap.java25 import com.github.javaparser.resolution.types.ResolvedType;
38 private Map<String, ResolvedType> nameToValue;
46 private Builder(Map<String, ResolvedType> nameToValue, in Builder()
59 ResolvedType value) { in setValue()
91 private Map<String, ResolvedType> nameToValue;
98 private ResolvedTypeParametersMap(Map<String, ResolvedType> nameToValue, in ResolvedTypeParametersMap()
106 public ResolvedType getValue(ResolvedTypeParameterDeclaration typeParameter) { in getValue()
115 public Optional<ResolvedType> getValueBySignature(String signature) { in getValueBySignature()
127 public List<ResolvedType> getTypes(){ in getTypes()
139 public ResolvedType replaceAll(ResolvedType type) { in replaceAll()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/declarations/common/
DMethodDeclarationCommonLogic.java22 import com.github.javaparser.resolution.types.ResolvedType;
46 public MethodUsage resolveTypeVariables(Context context, List<ResolvedType> parameterTypes) { in resolveTypeVariables()
47ResolvedType returnType = replaceTypeParams(methodDeclaration.getReturnType(), typeSolver, context… in resolveTypeVariables()
48 List<ResolvedType> params = new ArrayList<>(); in resolveTypeVariables()
50ResolvedType replaced = replaceTypeParams(methodDeclaration.getParam(i).getType(), typeSolver, con… in resolveTypeVariables()
59 ResolvedType formalParamType = methodDeclaration.getParam(i).getType(); in resolveTypeVariables()
60 ResolvedType actualParamType = parameterTypes.get(i); in resolveTypeVariables()
69 …private ResolvedType replaceTypeParams(ResolvedType type, TypeSolver typeSolver, Context context) { in replaceTypeParams()
73 … Optional<ResolvedType> typeParam = typeParamByName(typeParameter.getName(), typeSolver, context); in replaceTypeParams()
87 …protected Optional<ResolvedType> typeParamByName(String name, TypeSolver typeSolver, Context conte… in typeParamByName()
[all …]
/external/javaparser/javaparser-symbol-solver-logic/src/main/java/com/github/javaparser/symbolsolver/logic/
DInferenceVariableType.java21 import com.github.javaparser.resolution.types.ResolvedType;
34 public class InferenceVariableType implements ResolvedType {
49 private Set<ResolvedType> equivalentTypes = new HashSet<>();
52 public void registerEquivalentType(ResolvedType type) { in registerEquivalentType()
72 private Set<ResolvedType> superTypes = new HashSet<>();
97 public boolean isAssignableBy(ResolvedType other) { in isAssignableBy()
101 …private Set<ResolvedType> concreteEquivalentTypesAlsoIndirectly(Set<InferenceVariableType> conside… in concreteEquivalentTypesAlsoIndirectly()
103 Set<ResolvedType> result = new HashSet<>(); in concreteEquivalentTypesAlsoIndirectly()
114 public ResolvedType equivalentType() { in equivalentType()
115 …Set<ResolvedType> concreteEquivalent = concreteEquivalentTypesAlsoIndirectly(new HashSet<>(), this… in equivalentType()
[all …]
DInferenceContext.java58 public ResolvedType addPair(ResolvedType target, ResolvedType actual) { in addPair()
65 public ResolvedType addSingle(ResolvedType actual) { in addSingle()
69 private void registerCorrespondance(ResolvedType formalType, ResolvedType actualType) { in registerCorrespondance()
77 …List<ResolvedType> correspondingFormalType = ancestors.stream().filter((a) -> a.getQualifiedName()… in registerCorrespondance()
81 …List<ResolvedType> correspondingActualType = ancestors.stream().filter(a -> a.getQualifiedName().e… in registerCorrespondance()
97 … for (ResolvedType formalTypeParameter : formalTypeAsReference.typeParametersValues()) { in registerCorrespondance()
162 private ResolvedType placeInferenceVariables(ResolvedType type) { in placeInferenceVariables()
188 public ResolvedType resolve(ResolvedType type) { in resolve()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javassistmodel/
DJavassistUtils.java43 …static Optional<MethodUsage> getMethodUsage(CtClass ctClass, String name, List<ResolvedType> argum… in getMethodUsage()
56 …List<ResolvedType> parametersOfReturnType = parseTypeParameters(methodSignature.getReturnType().to… in getMethodUsage()
57 ResolvedType newReturnType = methodUsage.returnType(); in getMethodUsage()
97 …private static List<ResolvedType> parseTypeParameters(String signature, TypeSolver typeSolver, Con… in parseTypeParameters()
110 List<ResolvedType> types = new ArrayList<>(); in parseTypeParameters()
114 … List<ResolvedType> typeParameters = parseTypeParameters(signature, typeSolver, invokationContext); in parseTypeParameters()
122ResolvedType type = new SymbolSolver(typeSolver).solveTypeUsage(signature, invokationContext); in parseTypeParameters()
127 List<ResolvedType> types = new ArrayList<>(); in parseTypeParameters()
135 …static ResolvedType signatureTypeToType(SignatureAttribute.Type signatureType, TypeSolver typeSolv… in signatureTypeToType()
138 …List<ResolvedType> typeArguments = classType.getTypeArguments() == null ? Collections.emptyList() … in signatureTypeToType()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/constraintformulas/
DTypeCompatibleWithType.java3 import com.github.javaparser.resolution.types.ResolvedType;
19 private ResolvedType s;
20 private ResolvedType t;
23 public TypeCompatibleWithType(TypeSolver typeSolver, ResolvedType s, ResolvedType t) { in TypeCompatibleWithType()
47ResolvedType sFirst = new ReferenceTypeImpl(typeSolver.solveType(s.asPrimitive().getBoxTypeQName()… in reduce()
55ResolvedType tFirst = new ReferenceTypeImpl(typeSolver.solveType(t.asPrimitive().getBoxTypeQName()… in reduce()
74 ResolvedType G = t.asReferenceType().toRawType(); in reduce()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/resolution/declarations/
DResolvedTypeParameterDeclaration.java25 import com.github.javaparser.resolution.types.ResolvedType;
202 default ResolvedType getLowerBound() {
216 default ResolvedType getUpperBound() {
230 private ResolvedType type;
232 private Bound(boolean extendsBound, ResolvedType type) {
243 public static Bound extendsBound(ResolvedType type) {
253 public static Bound superBound(ResolvedType type) {
260 public ResolvedType getType() {
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/
DGenericsResolutionTest.java32 import com.github.javaparser.resolution.types.ResolvedType;
59 ResolvedType type = symbolReference.get().getType(); in resolveFieldWithGenericTypeToString()
76 ResolvedType type = symbolReference.get().getType(); in resolveFieldWithGenericTypeToDeclaredClass()
93 ResolvedType type = symbolReference.get().getType(); in resolveFieldWithGenericTypeToInteger()
110 ResolvedType type = symbolReference.get().getType(); in resolveFieldOfVariableType()
127 ResolvedType type = symbolReference.get().getType(); in resolveFieldOfGenericReferringToVariableType()
131 ResolvedType typeParam = type.asReferenceType().typeParametersValues().get(0); in resolveFieldOfGenericReferringToVariableType()
145 ResolvedType type = JavaParserFacade.get(new ReflectionTypeSolver()).getType(expression); in resolveUsageOfGenericFieldSimpleCase()
159 ResolvedType type = JavaParserFacade.get(new ReflectionTypeSolver()).getType(field); in resolveUsageOfGenericFieldIntermediateCase()
177 ResolvedType type = JavaParserFacade.get(new ReflectionTypeSolver()).getType(expression); in resolveUsageOfGenericFieldAdvancedCase()
[all …]

1234567