Home
last modified time | relevance | path

Searched refs:typeSolver (Results 1 – 25 of 318) sorted by relevance

12345678910>>...13

/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/
DJavaParserFactory.java43 public static Context getContext(Node node, TypeSolver typeSolver) { in getContext() argument
47 return new BlockStmtContext((BlockStmt) node, typeSolver); in getContext()
49 return new CompilationUnitContext((CompilationUnit) node, typeSolver); in getContext()
51 return new ForEachStatementContext((ForEachStmt) node, typeSolver); in getContext()
53 return new ForStatementContext((ForStmt) node, typeSolver); in getContext()
55 return new LambdaExprContext((LambdaExpr) node, typeSolver); in getContext()
57 return new MethodContext((MethodDeclaration) node, typeSolver); in getContext()
59 return new ConstructorContext((ConstructorDeclaration) node, typeSolver); in getContext()
61 … return new ClassOrInterfaceDeclarationContext((ClassOrInterfaceDeclaration) node, typeSolver); in getContext()
63 return new MethodCallExprContext((MethodCallExpr) node, typeSolver); in getContext()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/javaparsermodel/
DJavaParserFactory.java47 public static Context getContext(Node node, TypeSolver typeSolver) { in getContext() argument
51 return new CompilationUnitContext((CompilationUnit) node, typeSolver); in getContext()
53 return new ForechStatementContext((ForeachStmt) node, typeSolver); in getContext()
55 return new ForStatementContext((ForStmt) node, typeSolver); in getContext()
57 return new LambdaExprContext((LambdaExpr) node, typeSolver); in getContext()
59 return new MethodContext((MethodDeclaration) node, typeSolver); in getContext()
61 return new ConstructorContext((ConstructorDeclaration) node, typeSolver); in getContext()
63 … return new ClassOrInterfaceDeclarationContext((ClassOrInterfaceDeclaration) node, typeSolver); in getContext()
65 return new MethodCallExprContext((MethodCallExpr) node, typeSolver); in getContext()
67 return new EnumDeclarationContext((EnumDeclaration) node, typeSolver); in getContext()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/model/typesystem/
DReferenceTypeTest.java56 private TypeSolver typeSolver; field in ReferenceTypeTest
60 typeSolver = new ReflectionTypeSolver(); in setup()
61 …ject = new ReferenceTypeImpl(new ReflectionClassDeclaration(Object.class, typeSolver), typeSolver); in setup()
62 …ring = new ReferenceTypeImpl(new ReflectionClassDeclaration(String.class, typeSolver), typeSolver); in setup()
64 new ReflectionInterfaceDeclaration(List.class, typeSolver), in setup()
65 …le(ResolvedTypeParameterDeclaration.onType("A", "foo.Bar", Collections.emptyList()))), typeSolver); in setup()
67 new ReflectionInterfaceDeclaration(List.class, typeSolver), in setup()
68 …erenceTypeImpl(new ReflectionClassDeclaration(String.class, typeSolver), typeSolver)), typeSolver); in setup()
70 new ReflectionClassDeclaration(LinkedList.class, typeSolver), in setup()
71 …erenceTypeImpl(new ReflectionClassDeclaration(String.class, typeSolver), typeSolver)), typeSolver); in setup()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/
DTypeInferenceCache.java17 …public static void record(TypeSolver typeSolver, LambdaExpr lambdaExpr, String paramName, Resolved… in record() argument
18 if (!typeForLambdaParameters.containsKey(typeSolver)) { in record()
19 typeForLambdaParameters.put(typeSolver, new IdentityHashMap<>()); in record()
21 if (!typeForLambdaParameters.get(typeSolver).containsKey(lambdaExpr)) { in record()
22 typeForLambdaParameters.get(typeSolver).put(lambdaExpr, new HashMap<>()); in record()
24 typeForLambdaParameters.get(typeSolver).get(lambdaExpr).put(paramName, type); in record()
27 …public static Optional<ResolvedType> retrieve(TypeSolver typeSolver, LambdaExpr lambdaExpr, String… in retrieve() argument
28 if (!typeForLambdaParameters.containsKey(typeSolver)) { in retrieve()
31 if (!typeForLambdaParameters.get(typeSolver).containsKey(lambdaExpr)) { in retrieve()
34 if (!typeForLambdaParameters.get(typeSolver).get(lambdaExpr).containsKey(paramName)) { in retrieve()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/javaparsermodel/contexts/
DStatementContext.java44 public StatementContext(N wrappedNode, TypeSolver typeSolver) { in StatementContext() argument
45 super(wrappedNode, typeSolver); in StatementContext()
48 …rence<? extends ValueDeclaration> solveInBlock(String name, TypeSolver typeSolver, Statement stmt)… in solveInBlock() argument
63 …olDeclarator = JavaParserFactory.getSymbolDeclarator(blockStmt.getStatements().get(i), typeSolver); in solveInBlock()
71 …return JavaParserFactory.getContext(getParentNode(stmt), typeSolver).solveSymbol(name, typeSolver); in solveInBlock()
74 …public static Optional<Value> solveInBlockAsValue(String name, TypeSolver typeSolver, Statement st… in solveInBlockAsValue() argument
89 …olDeclarator = JavaParserFactory.getSymbolDeclarator(blockStmt.getStatements().get(i), typeSolver); in solveInBlockAsValue()
97 …rn JavaParserFactory.getContext(getParentNode(stmt), typeSolver).solveSymbolAsValue(name, typeSolv… in solveInBlockAsValue()
101 public Optional<Value> solveSymbolAsValue(String name, TypeSolver typeSolver) { in solveSymbolAsValue() argument
104 …SymbolDeclarator symbolDeclarator = JavaParserFactory.getSymbolDeclarator(wrappedNode, typeSolver); in solveSymbolAsValue()
[all …]
DClassOrInterfaceDeclarationContext.java43 …lassOrInterfaceDeclarationContext(ClassOrInterfaceDeclaration wrappedNode, TypeSolver typeSolver) { in ClassOrInterfaceDeclarationContext() argument
44 super(wrappedNode, typeSolver); in ClassOrInterfaceDeclarationContext()
45 …is.javaParserTypeDeclarationAdapter = new JavaParserTypeDeclarationAdapter(wrappedNode, typeSolver, in ClassOrInterfaceDeclarationContext()
54 …ublic SymbolReference<? extends ValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { in solveSymbol() argument
55 if (typeSolver == null) throw new IllegalArgumentException(); in solveSymbol()
62 return getParent().solveSymbol(name, typeSolver); in solveSymbol()
66 public Optional<Value> solveSymbolAsValue(String name, TypeSolver typeSolver) { in solveSymbolAsValue() argument
67 if (typeSolver == null) throw new IllegalArgumentException(); in solveSymbolAsValue()
74 return getParent().solveSymbolAsValue(name, typeSolver); in solveSymbolAsValue()
78 public Optional<Type> solveGenericType(String name, TypeSolver typeSolver) { in solveGenericType() argument
[all …]
DAbstractMethodLikeDeclarationContext.java29 public AbstractMethodLikeDeclarationContext(T wrappedNode, TypeSolver typeSolver) { in AbstractMethodLikeDeclarationContext() argument
30 super(wrappedNode, typeSolver); in AbstractMethodLikeDeclarationContext()
33 …final SymbolReference<? extends ValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { in solveSymbol() argument
35 SymbolDeclarator sb = JavaParserFactory.getSymbolDeclarator(parameter, typeSolver); in solveSymbol()
43 return getParent().solveSymbol(name, typeSolver); in solveSymbol()
47 public final Optional<Type> solveGenericType(String name, TypeSolver typeSolver) { in solveGenericType() argument
50 return Optional.of(new TypeVariable(new JavaParserTypeParameter(tp, typeSolver))); in solveGenericType()
53 return super.solveGenericType(name, typeSolver); in solveGenericType()
57 public final Optional<Value> solveSymbolAsValue(String name, TypeSolver typeSolver) { in solveSymbolAsValue() argument
59 SymbolDeclarator sb = JavaParserFactory.getSymbolDeclarator(parameter, typeSolver); in solveSymbolAsValue()
[all …]
DMethodCallExprContext.java54 public MethodCallExprContext(MethodCallExpr wrappedNode, TypeSolver typeSolver) { in MethodCallExprContext() argument
55 super(wrappedNode, typeSolver); in MethodCallExprContext()
63 public Optional<Type> solveGenericType(String name, TypeSolver typeSolver) { in solveGenericType() argument
65 … Type typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope().get()); in solveGenericType()
79 …al<MethodUsage> solveMethodAsUsage(String name, List<Type> argumentsTypes, TypeSolver typeSolver) { in solveMethodAsUsage() argument
85 SymbolReference<TypeDeclaration> ref = solveType(className, typeSolver); in solveMethodAsUsage()
87 …lutionLogic.solveMethodInType(ref.getCorrespondingDeclaration(), name, argumentsTypes, typeSolver); in solveMethodAsUsage()
90 … methodUsage = resolveMethodTypeParametersFromExplicitList(typeSolver, methodUsage); in solveMethodAsUsage()
100 Type typeOfScope = JavaParserFacade.get(typeSolver).getType(scope); in solveMethodAsUsage()
116 return solveMethodAsUsage(typeOfScope, name, argumentsTypes, typeSolver, this); in solveMethodAsUsage()
[all …]
DFieldAccessContext.java46 public FieldAccessContext(FieldAccessExpr wrappedNode, TypeSolver typeSolver) { in FieldAccessContext() argument
47 super(wrappedNode, typeSolver); in FieldAccessContext()
51 …ublic SymbolReference<? extends ValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { in solveSymbol() argument
54 Type typeOfThis = JavaParserFacade.get(typeSolver).getTypeOfThisIn(wrappedNode); in solveSymbol()
55 …return new SymbolSolver(typeSolver).solveSymbolInType(typeOfThis.asReferenceType().getTypeDeclarat… in solveSymbol()
58 …JavaParserFactory.getContext(getParentNode(wrappedNode), typeSolver).solveSymbol(name, typeSolver); in solveSymbol()
62 public SymbolReference<TypeDeclaration> solveType(String name, TypeSolver typeSolver) { in solveType() argument
63 …n JavaParserFactory.getContext(getParentNode(wrappedNode), typeSolver).solveType(name, typeSolver); in solveType()
67 …n> solveMethod(String name, List<Type> parameterTypes, boolean staticOnly, TypeSolver typeSolver) { in solveMethod() argument
68 …ctory.getContext(getParentNode(wrappedNode), typeSolver).solveMethod(name, parameterTypes, false, in solveMethod()
[all …]
DJavaParserTypeDeclarationAdapter.java28 private TypeSolver typeSolver; field in JavaParserTypeDeclarationAdapter
32 …rationAdapter(com.github.javaparser.ast.body.TypeDeclaration<?> wrappedNode, TypeSolver typeSolver, in JavaParserTypeDeclarationAdapter() argument
36 this.typeSolver = typeSolver; in JavaParserTypeDeclarationAdapter()
41 public SymbolReference<TypeDeclaration> solveType(String name, TypeSolver typeSolver) { in solveType() argument
43 … return SymbolReference.solved(JavaParserFacade.get(typeSolver).getTypeDeclaration(wrappedNode)); in solveType()
51 … return SymbolReference.solved(JavaParserFacade.get(typeSolver).getTypeDeclaration(internalType)); in solveType()
53 …tory.getContext(internalType, typeSolver).solveType(name.substring(wrappedNode.getName().getId().l… in solveType()
55 …tory.getContext(internalType, typeSolver).solveType(name.substring(internalType.getName().getId().… in solveType()
65 return SymbolReference.solved(new JavaParserTypeParameter(astTp, typeSolver)); in solveType()
83 return context.getParent().solveType(name, typeSolver); in solveType()
[all …]
DEnumDeclarationContext.java38 public EnumDeclarationContext(EnumDeclaration wrappedNode, TypeSolver typeSolver) { in EnumDeclarationContext() argument
39 super(wrappedNode, typeSolver); in EnumDeclarationContext()
40 …is.javaParserTypeDeclarationAdapter = new JavaParserTypeDeclarationAdapter(wrappedNode, typeSolver, in EnumDeclarationContext()
45 …ublic SymbolReference<? extends ValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { in solveSymbol() argument
46 if (typeSolver == null) throw new IllegalArgumentException(); in solveSymbol()
51 … return SymbolReference.solved(new JavaParserEnumConstantDeclaration(constant, typeSolver)); in solveSymbol()
60 return getParent().solveSymbol(name, typeSolver); in solveSymbol()
64 …er.symbolsolver.model.declarations.TypeDeclaration> solveType(String name, TypeSolver typeSolver) { in solveType() argument
65 return javaParserTypeDeclarationAdapter.solveType(name, typeSolver); in solveType()
69 …n> solveMethod(String name, List<Type> argumentsTypes, boolean staticOnly, TypeSolver typeSolver) { in solveMethod() argument
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/resolution/
DSymbolSolver.java49 private TypeSolver typeSolver; field in SymbolSolver
51 public SymbolSolver(TypeSolver typeSolver) { in SymbolSolver() argument
52 if (typeSolver == null) throw new IllegalArgumentException(); in SymbolSolver()
54 this.typeSolver = typeSolver; in SymbolSolver()
58 return context.solveSymbol(name, typeSolver); in solveSymbol()
62 return solveSymbol(name, JavaParserFactory.getContext(node, typeSolver)); in solveSymbol()
66 return context.solveSymbolAsValue(name, typeSolver); in solveSymbolAsValue()
70 Context context = JavaParserFactory.getContext(node, typeSolver); in solveSymbolAsValue()
75 return context.solveType(name, typeSolver); in solveType()
79 return solveType(name, JavaParserFactory.getContext(node, typeSolver)); in solveType()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/naming/
DNameLogicDisambiguationTest.java27 ParseStart parseStart, TypeSolver typeSolver) { in assertNameInCodeIsDisambiguited() argument
28 Node nameNode = getNameInCodeTollerant(code, name, parseStart, typeSolver); in assertNameInCodeIsDisambiguited()
30 assertEquals(nameCategory, NameLogic.classifyReference(nameNode, typeSolver)); in assertNameInCodeIsDisambiguited()
127 MemoryTypeSolver typeSolver = new MemoryTypeSolver(); in ambiguousNameToSingleStaticImportDeclaration() local
133 typeSolver.addDeclaration("foo.bar.C", mockedC); in ambiguousNameToSingleStaticImportDeclaration()
138 new CombinedTypeSolver(new ReflectionTypeSolver(), typeSolver)); in ambiguousNameToSingleStaticImportDeclaration()
143 MemoryTypeSolver typeSolver = new MemoryTypeSolver(); in ambiguousNameToStaticImportOnDemandDeclaration() local
149 typeSolver.addDeclaration("foo.bar.C", mockedC); in ambiguousNameToStaticImportOnDemandDeclaration()
154 new CombinedTypeSolver(new ReflectionTypeSolver(), typeSolver)); in ambiguousNameToStaticImportOnDemandDeclaration()
179 MemoryTypeSolver typeSolver = new MemoryTypeSolver(); in ambiguousNameInQualifiedNameRequalifiedAsPackageNameLeadingToType() local
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/javassistmodel/
DJavassistClassDeclaration.java52 private TypeSolver typeSolver; field in JavassistClassDeclaration
55 public JavassistClassDeclaration(CtClass ctClass, TypeSolver typeSolver) { in JavassistClassDeclaration() argument
63 this.typeSolver = typeSolver; in JavassistClassDeclaration()
64 … this.javassistTypeDeclarationAdapter = new JavassistTypeDeclarationAdapter(ctClass, typeSolver); in JavassistClassDeclaration()
69 … return new ReferenceTypeImpl(typeSolver.solveType(Object.class.getCanonicalName()), typeSolver); in object()
84 return isAssignableBy(new ReferenceTypeImpl(other, typeSolver)); in isAssignableBy()
123 …onal<MethodUsage> solveMethodAsUsage(String name, List<Type> argumentsTypes, TypeSolver typeSolver, in solveMethodAsUsage() argument
125 …return JavassistUtils.getMethodUsage(ctClass, name, argumentsTypes, typeSolver, invokationContext); in solveMethodAsUsage()
129 …ublic SymbolReference<? extends ValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { in solveSymbol() argument
132 return SymbolReference.solved(new JavassistFieldDeclaration(field, typeSolver)); in solveSymbol()
[all …]
DJavassistFactory.java31 public static Type typeUsageFor(CtClass ctClazz, TypeSolver typeSolver) { in typeUsageFor() argument
34 return new ArrayType(typeUsageFor(ctClazz.getComponentType(), typeSolver)); in typeUsageFor()
43 return new ReferenceTypeImpl(new JavassistInterfaceDeclaration(ctClazz, typeSolver), in typeUsageFor()
44 typeSolver); in typeUsageFor()
46 return new ReferenceTypeImpl(new JavassistEnumDeclaration(ctClazz, typeSolver), in typeUsageFor()
47 typeSolver); in typeUsageFor()
49 return new ReferenceTypeImpl(new JavassistClassDeclaration(ctClazz, typeSolver), in typeUsageFor()
50 typeSolver); in typeUsageFor()
58 public static ReferenceTypeDeclaration toTypeDeclaration(CtClass ctClazz, TypeSolver typeSolver) { in toTypeDeclaration() argument
60 return new JavassistInterfaceDeclaration(ctClazz, typeSolver); in toTypeDeclaration()
[all …]
DJavassistInterfaceDeclaration.java48 private TypeSolver typeSolver; field in JavassistInterfaceDeclaration
55 ", typeSolver=" + typeSolver + in toString()
59 public JavassistInterfaceDeclaration(CtClass ctClass, TypeSolver typeSolver) { in JavassistInterfaceDeclaration() argument
64 this.typeSolver = typeSolver; in JavassistInterfaceDeclaration()
65 … this.javassistTypeDeclarationAdapter = new JavassistTypeDeclarationAdapter(ctClass, typeSolver); in JavassistInterfaceDeclaration()
71 …n Arrays.stream(ctClass.getInterfaces()).map(i -> new JavassistInterfaceDeclaration(i, typeSolver)) in getInterfacesExtended()
72 .map(i -> new ReferenceTypeImpl(i, typeSolver)).collect(Collectors.toList()); in getInterfacesExtended()
98 …onal<MethodUsage> solveMethodAsUsage(String name, List<Type> argumentsTypes, TypeSolver typeSolver, in solveMethodAsUsage() argument
101 …return JavassistUtils.getMethodUsage(ctClass, name, argumentsTypes, typeSolver, invokationContext); in solveMethodAsUsage()
112 candidates.add(new JavassistMethodDeclaration(method, typeSolver)); in solveMethod()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javassistmodel/
DJavassistFactory.java32 public static ResolvedType typeUsageFor(CtClass ctClazz, TypeSolver typeSolver) { in typeUsageFor() argument
35 return new ResolvedArrayType(typeUsageFor(ctClazz.getComponentType(), typeSolver)); in typeUsageFor()
44 return new ReferenceTypeImpl(new JavassistInterfaceDeclaration(ctClazz, typeSolver), in typeUsageFor()
45 typeSolver); in typeUsageFor()
47 return new ReferenceTypeImpl(new JavassistEnumDeclaration(ctClazz, typeSolver), in typeUsageFor()
48 typeSolver); in typeUsageFor()
50 return new ReferenceTypeImpl(new JavassistClassDeclaration(ctClazz, typeSolver), in typeUsageFor()
51 typeSolver); in typeUsageFor()
59 …static ResolvedReferenceTypeDeclaration toTypeDeclaration(CtClass ctClazz, TypeSolver typeSolver) { in toTypeDeclaration() argument
61 return new JavassistAnnotationDeclaration(ctClazz, typeSolver); in toTypeDeclaration()
[all …]
DJavassistUtils.java39 …MethodUsage(CtClass ctClass, String name, List<ResolvedType> argumentsTypes, TypeSolver typeSolver, in getMethodUsage() argument
46 … MethodUsage methodUsage = new MethodUsage(new JavassistMethodDeclaration(method, typeSolver)); in getMethodUsage()
64 … ref = JavassistUtils.getMethodUsage(superClass, name, argumentsTypes, typeSolver, typeParameters,… in getMethodUsage()
75 …> ref = JavassistUtils.getMethodUsage(interfaze, name, argumentsTypes, typeSolver, typeParameters,… in getMethodUsage()
84 … return MethodResolutionLogic.findMostApplicableUsage(methods, name, argumentsTypes, typeSolver); in getMethodUsage()
87 … signatureTypeToType(SignatureAttribute.Type signatureType, TypeSolver typeSolver, ResolvedTypePar… in signatureTypeToType() argument
90 ….stream(classType.getTypeArguments()).map(ta -> typeArgumentToType(ta, typeSolver, typeParametriza… in signatureTypeToType()
91 ResolvedReferenceTypeDeclaration typeDeclaration = typeSolver.solveType( in signatureTypeToType()
93 return new ReferenceTypeImpl(typeDeclaration, typeArguments, typeSolver); in signatureTypeToType()
104 …ew ResolvedArrayType(signatureTypeToType(arrayType.getComponentType(), typeSolver, typeParametriza… in signatureTypeToType()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/javaparser/contexts/
DCompilationUnitContextResolutionTest.java55 private TypeSolver typeSolver; field in CompilationUnitContextResolutionTest
59 typeSolver = new ReflectionTypeSolver(); in setup()
65 Context context = new CompilationUnitContext(cu, typeSolver); in getParent()
73 Context context = new CompilationUnitContext(cu, typeSolver); in solveExistingGenericType()
87 Context context = new CompilationUnitContext(cu, typeSolver); in solveUnexistingGenericType()
98 CombinedTypeSolver typeSolver = new CombinedTypeSolver(); in solveSymbolReferringToStaticallyImportedValue() local
99 typeSolver.add(new ReflectionTypeSolver()); in solveSymbolReferringToStaticallyImportedValue()
100 typeSolver.add(new JarTypeSolver(adaptPath("src/test/resources/junit-4.8.1.jar"))); in solveSymbolReferringToStaticallyImportedValue()
102 Context context = new CompilationUnitContext(cu, typeSolver); in solveSymbolReferringToStaticallyImportedValue()
113 CombinedTypeSolver typeSolver = new CombinedTypeSolver(); in solveSymbolReferringToStaticallyImportedUsingAsteriskValue() local
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/
DContextTest.java59 …private TypeSolver typeSolver = new CombinedTypeSolver(new MemoryTypeSolver(), new ReflectionTypeS… field in ContextTest
74 SymbolSolver symbolSolver = new SymbolSolver(typeSolver); in resolveDeclaredFieldReference()
90 SymbolSolver symbolSolver = new SymbolSolver(typeSolver); in resolveInheritedFieldReference()
105 SymbolSolver symbolSolver = new SymbolSolver(typeSolver); in resolveParameterReference()
123 TypeSolver typeSolver = mock(TypeSolver.class); in resolveReferenceToImportedType() local
124 when(typeSolver.getRoot()).thenReturn(typeSolver); in resolveReferenceToImportedType()
125 …when(typeSolver.solveType("java.lang.Object")).thenReturn(new ReflectionClassDeclaration(Object.cl… in resolveReferenceToImportedType()
126 …when(typeSolver.tryToSolveType("com.github.javaparser.ast.CompilationUnit")).thenReturn(SymbolRefe… in resolveReferenceToImportedType()
127 SymbolSolver symbolSolver = new SymbolSolver(typeSolver); in resolveReferenceToImportedType()
146 TypeSolver typeSolver = mock(TypeSolver.class); in resolveReferenceUsingQualifiedName() local
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionEnumDeclarationTest.java35 private TypeSolver typeSolver = new ReflectionTypeSolver(false); field in ReflectionEnumDeclarationTest
45 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testIsClass()
51 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testIsInterface()
57 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testIsEnum()
63 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testIsTypeVariable()
69 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testIsType()
75 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testAsType()
82 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testAsClass()
90 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testAsInterface()
97 …ReflectionEnumDeclaration modifier = (ReflectionEnumDeclaration) typeSolver.solveType("com.github.… in testAsEnum()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionClassAdapter.java26 private TypeSolver typeSolver; field in ReflectionClassAdapter
29 …public ReflectionClassAdapter(Class<?> clazz, TypeSolver typeSolver, ReferenceTypeDeclaration type… in ReflectionClassAdapter() argument
31 this.typeSolver = typeSolver; in ReflectionClassAdapter()
43 .map((t) -> ReflectionFactory.typeUsageFor(t, typeSolver)) in getSuperClass()
45 …mpl(new ReflectionClassDeclaration(clazz.getSuperclass(), typeSolver), typeParameters, typeSolver); in getSuperClass()
47 …w ReferenceTypeImpl(new ReflectionClassDeclaration(clazz.getSuperclass(), typeSolver), typeSolver); in getSuperClass()
56 .map((t) -> ReflectionFactory.typeUsageFor(t, typeSolver)) in getInterfaces()
58 …s<?>) ((ParameterizedType) superInterface).getRawType(), typeSolver), typeParameters, typeSolver)); in getInterfaces()
60 …ceTypeImpl(new ReflectionInterfaceDeclaration((Class<?>) superInterface, typeSolver), typeSolver)); in getInterfaces()
72 …ject = new ReferenceTypeImpl(new ReflectionClassDeclaration(Object.class, typeSolver), typeSolver); in getAncestors()
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionClassAdapter.java26 private TypeSolver typeSolver; field in ReflectionClassAdapter
29 …public ReflectionClassAdapter(Class<?> clazz, TypeSolver typeSolver, ResolvedReferenceTypeDeclarat… in ReflectionClassAdapter() argument
31 this.typeSolver = typeSolver; in ReflectionClassAdapter()
43 .map((t) -> ReflectionFactory.typeUsageFor(t, typeSolver)) in getSuperClass()
45 …mpl(new ReflectionClassDeclaration(clazz.getSuperclass(), typeSolver), typeParameters, typeSolver); in getSuperClass()
47 …w ReferenceTypeImpl(new ReflectionClassDeclaration(clazz.getSuperclass(), typeSolver), typeSolver); in getSuperClass()
56 .map((t) -> ReflectionFactory.typeUsageFor(t, typeSolver)) in getInterfaces()
58 …s<?>) ((ParameterizedType) superInterface).getRawType(), typeSolver), typeParameters, typeSolver)); in getInterfaces()
60 …ceTypeImpl(new ReflectionInterfaceDeclaration((Class<?>) superInterface, typeSolver), typeSolver)); in getInterfaces()
72 …ject = new ReferenceTypeImpl(new ReflectionClassDeclaration(Object.class, typeSolver), typeSolver); in getAncestors()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/javaparsermodel/declarations/
DJavaParserInterfaceDeclaration.java47 private TypeSolver typeSolver; field in JavaParserInterfaceDeclaration
51 …ic JavaParserInterfaceDeclaration(ClassOrInterfaceDeclaration wrappedNode, TypeSolver typeSolver) { in JavaParserInterfaceDeclaration() argument
56 this.typeSolver = typeSolver; in JavaParserInterfaceDeclaration()
57 this.javaParserTypeAdapter = new JavaParserTypeAdapter(wrappedNode, typeSolver); in JavaParserInterfaceDeclaration()
65 …avaParserMethodDeclaration((com.github.javaparser.ast.body.MethodDeclaration) member, typeSolver)); in getDeclaredMethods()
72 return JavaParserFactory.getContext(wrappedNode, typeSolver); in getContext()
109 …if (solveType(annotationExpr.getName().getId(), typeSolver).getCorrespondingDeclaration().getQuali… in hasDirectlyAnnotation()
126 …nceTypeImpl(solveType(t.getName().getId(), typeSolver).getCorrespondingDeclaration().asInterface()… in getInterfacesExtended()
165 …TypeDeclaration ancestor = (ReferenceTypeDeclaration) new SymbolSolver(typeSolver).solveType(type); in canBeAssignedTo()
174 …TypeDeclaration ancestor = (ReferenceTypeDeclaration) new SymbolSolver(typeSolver).solveType(type); in canBeAssignedTo()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/javassistmodel/
DJavassistInterfaceDeclarationTest.java36 private TypeSolver typeSolver; field in JavassistInterfaceDeclarationTest
43typeSolver = new CombinedTypeSolver(new JarTypeSolver(pathToJar), new ReflectionTypeSolver()); in setup()
55 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testIsClass()
61 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testIsInterface()
67 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testIsEnum()
73 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testIsTypeVariable()
79 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testIsType()
85 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testAsType()
92 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testAsClass()
99 …rfaceDeclaration nodeWithAnnotations = (JavassistInterfaceDeclaration) typeSolver.solveType("com.g… in testAsInterface()
[all …]

12345678910>>...13