Home
last modified time | relevance | path

Searched refs:methodDeclaration (Results 1 – 25 of 40) sorted by relevance

12

/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/core/resolution/
DContextHelper.java38 …age resolveTypeVariables(Context context, ResolvedMethodDeclaration methodDeclaration, List<Resolv… in resolveTypeVariables() argument
39 if (methodDeclaration instanceof JavaParserMethodDeclaration) { in resolveTypeVariables()
40 …return ((JavaParserMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameterTy… in resolveTypeVariables()
41 } else if (methodDeclaration instanceof JavassistMethodDeclaration) { in resolveTypeVariables()
42 …return ((JavassistMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameterTyp… in resolveTypeVariables()
43 } else if (methodDeclaration instanceof JavaParserEnumDeclaration.ValuesMethod) { in resolveTypeVariables()
44 …return ((JavaParserEnumDeclaration.ValuesMethod) methodDeclaration).resolveTypeVariables(context, … in resolveTypeVariables()
45 } else if (methodDeclaration instanceof ReflectionMethodDeclaration) { in resolveTypeVariables()
46 …return ((ReflectionMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameterTy… in resolveTypeVariables()
DContext.java91 … ResolvedMethodDeclaration methodDeclaration = methodSolved.getCorrespondingDeclaration(); in solveMethodAsUsage() local
92 …MethodUsage methodUsage = ContextHelper.resolveTypeVariables(this, methodDeclaration, argumentsTyp… in solveMethodAsUsage()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/
DTypeInference.java45 …dUsage toMethodUsage(MethodCallExpr call, ResolvedMethodDeclaration methodDeclaration, TypeSolver … in toMethodUsage() argument
47 …tantiationSet> instantiationSetOpt = typeInference.instantiationInference(call, methodDeclaration); in toMethodUsage()
49 return instantiationSetToMethodUsage(methodDeclaration, instantiationSetOpt.get()); in toMethodUsage()
59 …nstantiationInference(MethodCallExpr methodCallExpr, ResolvedMethodDeclaration methodDeclaration) { in instantiationInference() argument
60 return instantiationInference(methodCallExpr.getArguments(), methodDeclaration); in instantiationInference()
63 …ationInference(List<Expression> argumentExpressions, ResolvedMethodDeclaration methodDeclaration) { in instantiationInference() argument
74 List<ResolvedTypeParameterDeclaration> Ps = methodDeclaration.getTypeParameters(); in instantiationInference()
91 if (appearInThrowsClause(Pi, methodDeclaration)) { in instantiationInference()
101 List<ResolvedType> Fs = formalParameterTypes(methodDeclaration); in instantiationInference()
148 …pplicabilityInference(MethodCallExpr methodCallExpr, ResolvedMethodDeclaration methodDeclaration) { in invocationApplicabilityInference() argument
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/declarations/common/
DMethodDeclarationCommonLogic.java38 private ResolvedMethodDeclaration methodDeclaration; field in MethodDeclarationCommonLogic
41 …public MethodDeclarationCommonLogic(ResolvedMethodDeclaration methodDeclaration, TypeSolver typeSo… in MethodDeclarationCommonLogic() argument
42 this.methodDeclaration = methodDeclaration; in MethodDeclarationCommonLogic()
47 …ResolvedType returnType = replaceTypeParams(methodDeclaration.getReturnType(), typeSolver, context… in resolveTypeVariables()
49 for (int i = 0; i < methodDeclaration.getNumberOfParams(); i++) { in resolveTypeVariables()
50 …ResolvedType replaced = replaceTypeParams(methodDeclaration.getParam(i).getType(), typeSolver, con… in resolveTypeVariables()
58 …for (int i = 0; i < methodDeclaration.getNumberOfParams() - (methodDeclaration.hasVariadicParamete… in resolveTypeVariables()
59 ResolvedType formalParamType = methodDeclaration.getParam(i).getType(); in resolveTypeVariables()
66 return new MethodUsage(methodDeclaration, params, returnType); in resolveTypeVariables()
88 …return methodDeclaration.getTypeParameters().stream().filter(tp -> tp.getName().equals(name)).map(… in typeParamByName()
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/javasymbolsolver_0_6_0/expected_output/java-symbol-solver-core/
Dcom_github_javaparser_symbolsolver_declarations_common_MethodDeclarationCommonLogic.txt1 …Line 47) replaceTypeParams(methodDeclaration.getReturnType(), typeSolver, context) ==> com.github.…
2 …Line 47) methodDeclaration.getReturnType() ==> com.github.javaparser.symbolsolver.model.declaratio…
3 …Line 49) methodDeclaration.getNumberOfParams() ==> com.github.javaparser.symbolsolver.model.declar…
4 …Line 50) replaceTypeParams(methodDeclaration.getParam(i).getType(), typeSolver, context) ==> com.g…
5 …Line 50) methodDeclaration.getParam(i).getType() ==> com.github.javaparser.symbolsolver.model.decl…
6 …Line 50) methodDeclaration.getParam(i) ==> com.github.javaparser.symbolsolver.model.declarations.M…
8 …Line 58) methodDeclaration.getNumberOfParams() ==> com.github.javaparser.symbolsolver.model.declar…
9 …Line 58) methodDeclaration.hasVariadicParameter() ==> com.github.javaparser.symbolsolver.model.dec…
10 …Line 59) methodDeclaration.getParam(i).getType() ==> com.github.javaparser.symbolsolver.model.decl…
11 …Line 59) methodDeclaration.getParam(i) ==> com.github.javaparser.symbolsolver.model.declarations.M…
[all …]
Dcom_github_javaparser_symbolsolver_core_resolution_ContextHelper.txt1 …Line 40) ((JavaParserMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameter…
2 …Line 42) ((JavassistMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameterT…
3 …Line 44) ((JavaParserEnumDeclaration.ValuesMethod) methodDeclaration).resolveTypeVariables(context…
4 …Line 46) ((ReflectionMethodDeclaration) methodDeclaration).resolveTypeVariables(context, parameter…
/external/icu/tools/srcgen/currysrc/src/main/java/com/google/currysrc/api/process/ast/
DMethodLocator.java59 MethodDeclaration methodDeclaration = (MethodDeclaration) node; in matches() local
61 && methodDeclaration.getName().getFullyQualifiedName().equals(methodName) in matches()
62 && parameterMatcher.matches(methodDeclaration); in matches()
77 MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration; in find() local
78 if (methodDeclaration.getName().getFullyQualifiedName().equals(methodName)) { in find()
79 if (parameterMatcher.matches(methodDeclaration)) { in find()
80 return methodDeclaration; in find()
DParameterMatcher.java38 public boolean matches(MethodDeclaration methodDeclaration) { in matches() argument
39 List<String> actualParameterTypes = getParameterTypeNames(methodDeclaration); in matches()
56 public static List<String> getParameterTypeNames(MethodDeclaration methodDeclaration) { in getParameterTypeNames() argument
58 (List<SingleVariableDeclaration>) methodDeclaration.parameters(); in getParameterTypeNames()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/
DJavaParserTest.java132 …MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMember(0).asMethodDeclaratio… in rangeOfIntersectionType() local
133 ReturnStmt returnStmt = methodDeclaration.getBody().get().getStatement(0).asReturnStmt(); in rangeOfIntersectionType()
146 …MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMember(0).asMethodDeclaratio… in rangeOfCast() local
147 ReturnStmt returnStmt = methodDeclaration.getBody().get().getStatement(0).asReturnStmt(); in rangeOfCast()
159 …MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMember(0).asMethodDeclaratio… in rangeOfCastNonIntersection() local
160 ReturnStmt returnStmt = methodDeclaration.getBody().get().getStatement(0).asReturnStmt(); in rangeOfCastNonIntersection()
172 …MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMember(0).asMethodDeclaratio… in rangeOfLambda() local
173 ReturnStmt returnStmt = methodDeclaration.getBody().get().getStatement(0).asReturnStmt(); in rangeOfLambda()
188 …MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMember(0).asMethodDeclaratio… in rangeOfLambdaBody() local
189 ReturnStmt returnStmt = methodDeclaration.getBody().get().getStatement(0).asReturnStmt(); in rangeOfLambdaBody()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionMethodResolutionLogic.java52 … ResolvedMethodDeclaration methodDeclaration = new ReflectionMethodDeclaration(method, typeSolver); in solveMethod() local
53 methods.add(methodDeclaration); in solveMethod()
89 … ResolvedMethodDeclaration methodDeclaration = new ReflectionMethodDeclaration(method, typeSolver); in solveMethodAsUsage() local
90 … MethodUsage methodUsage = replaceParams(typeParameterValues, scopeType, methodDeclaration); in solveMethodAsUsage()
126 …ResolvedReferenceTypeDeclaration typeParametrizable, ResolvedMethodDeclaration methodDeclaration) { in replaceParams() argument
127 MethodUsage methodUsage = new MethodUsage(methodDeclaration); in replaceParams()
138 …for (ResolvedTypeParameterDeclaration methodTypeParameter : methodDeclaration.getTypeParameters())… in replaceParams()
DReflectionClassDeclaration.java141 … ResolvedMethodDeclaration methodDeclaration = new ReflectionMethodDeclaration(method, typeSolver); in solveMethod() local
142 methods.add(methodDeclaration); in solveMethod()
176 … ResolvedMethodDeclaration methodDeclaration = new ReflectionMethodDeclaration(method, typeSolver); in solveMethodAsUsage() local
177 MethodUsage methodUsage = new MethodUsage(methodDeclaration); in solveMethodAsUsage()
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/
DJavaSymbolSolverTest.java48 MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMethods().get(0); in resolveMethodDeclaration() local
49 ResolvedMethodDeclaration resolvedMethodDeclaration = methodDeclaration.resolve(); in resolveMethodDeclaration()
63 MethodDeclaration methodDeclaration = cu.getClassByName("A").get().getMethods().get(0); in resolveArrayType() local
64 ResolvedType resolvedType = methodDeclaration.getType().resolve(); in resolveArrayType()
DIssue186.java28 MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "foo"); in lambdaFlatMapIssue() local
29 … MethodCallExpr methodCallExpr = Navigator.findMethodCall(methodDeclaration, "flatMap").get(); in lambdaFlatMapIssue()
40 MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "bar"); in lambdaPrimitivesIssue() local
41 List<LambdaExpr> lambdas = methodDeclaration.findAll(LambdaExpr.class); in lambdaPrimitivesIssue()
DIssue116.java41 MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "foo"); in arrayTypeIsNotPartOfTheTree() local
44 … com.github.javaparser.ast.type.Type typeNode = methodDeclaration.getParameters().get(0).getType(); in arrayTypeIsNotPartOfTheTree()
48 …ExpressionStmt expressionStmt = (ExpressionStmt) methodDeclaration.getBody().get().getStatements()… in arrayTypeIsNotPartOfTheTree()
DIssue18.java40 MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "bar"); in typeDeclarationSuperClassImplicitlyIncludeObject() local
41 … ExpressionStmt expr = (ExpressionStmt) methodDeclaration.getBody().get().getStatements().get(1); in typeDeclarationSuperClassImplicitlyIncludeObject()
DIssue200.java27 MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "foo"); in issue200() local
30 List<ReturnStmt> nodesByType = methodDeclaration.findAll(ReturnStmt.class); in issue200()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/ast/type/
DArrayTypeTest.java88 …MethodDeclaration methodDeclaration = parseBodyDeclaration("@C int @A[] a() @B[] {}").asMethodDecl… in getMethodDeclarationWithArrays() local
90 ArrayType arrayType1 = methodDeclaration.getType().asArrayType(); in getMethodDeclarationWithArrays()
97 …assertThat(methodDeclaration.getAnnotations()).containsExactly(new MarkerAnnotationExpr(parseName(… in getMethodDeclarationWithArrays()
99 assertThat(methodDeclaration.getType().getParentNode().get()).isSameAs(methodDeclaration); in getMethodDeclarationWithArrays()
104 …MethodDeclaration methodDeclaration = parseBodyDeclaration("void a(@C int @A[] a @B[]) {}").asMeth… in getParameterWithArrays() local
106 Parameter parameter = methodDeclaration.getParameter(0); in getParameterWithArrays()
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_new_src/javaparser-core/com/github/javaparser/ast/nodeTypes/
DNodeWithMembers.java163 MethodDeclaration methodDeclaration = new MethodDeclaration(); in addMethod() local
164 methodDeclaration.setName(methodName); in addMethod()
165 methodDeclaration.setType(VOID_TYPE); in addMethod()
166 methodDeclaration.setModifiers(Arrays.stream(modifiers) in addMethod()
168 getMembers().add(methodDeclaration); in addMethod()
169 methodDeclaration.setParentNode((Node) this); in addMethod()
170 return methodDeclaration; in addMethod()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DLexicalPreservingPrinterTest.java531 MethodDeclaration methodDeclaration = (MethodDeclaration) member; in handleOverrideAnnotation()
532 … if (!methodDeclaration.getAnnotationByName("Override").isPresent()) { in handleOverrideAnnotation()
533 methodDeclaration.addAnnotation("Override"); in handleOverrideAnnotation()
766 MethodDeclaration methodDeclaration = cu.getType(0).getMethodsByName("someMethod").get(0); in addASecondStatementToExistingMethod() local
767 methodDeclaration.getBody().get().getStatements().add(new ExpressionStmt( in addASecondStatementToExistingMethod()
777 + " }", LexicalPreservingPrinter.print(methodDeclaration)); in addASecondStatementToExistingMethod()
797 member.ifMethodDeclaration(methodDeclaration -> { in moveOverrideAnnotations()
798 … if (methodDeclaration.getAnnotationByName("Override").isPresent()) { in moveOverrideAnnotations()
800 while (methodDeclaration.getAnnotations().isNonEmpty()) { in moveOverrideAnnotations()
801 … AnnotationExpr annotationExpr = methodDeclaration.getAnnotations().get(0); in moveOverrideAnnotations()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/nodeTypes/
DNodeWithMembers.java210 MethodDeclaration methodDeclaration = new MethodDeclaration(); in addMethod() local
211 methodDeclaration.setName(methodName); in addMethod()
212 methodDeclaration.setType(new VoidType()); in addMethod()
213 methodDeclaration.setModifiers(Arrays.stream(modifiers) in addMethod()
215 getMembers().add(methodDeclaration); in addMethod()
216 return methodDeclaration; in addMethod()
/external/javaparser/javaparser-symbol-solver-logic/src/main/java/com/github/javaparser/symbolsolver/logic/
DAbstractTypeDeclaration.java41 for (ResolvedMethodDeclaration methodDeclaration : getDeclaredMethods()) { in getAllMethods()
42 methods.add(new MethodUsage(methodDeclaration)); in getAllMethods()
43 methodsSignatures.add(methodDeclaration.getSignature()); in getAllMethods()
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/javasymbolsolver_0_6_0/expected_output/java-symbol-solver-logic/
Dcom_github_javaparser_symbolsolver_logic_AbstractTypeDeclaration.txt2 Line 43) methods.add(new MethodUsage(methodDeclaration)) ==> java.util.Set.add(E)
3 Line 44) methodsSignatures.add(methodDeclaration.getSignature()) ==> java.util.Set.add(E)
4 …Line 44) methodDeclaration.getSignature() ==> com.github.javaparser.symbolsolver.model.declaration…
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/javaparser/declarations/
DJavaParserTypeParameterResolutionTest.java69 …ResolvedMethodDeclaration methodDeclaration = javaParserFacade.solve(callToFoo).getCorrespondingDe… in declaredOnMethodPositiveCase() local
70 for (ResolvedTypeParameterDeclaration tp : methodDeclaration.getTypeParameters()) { in declaredOnMethodPositiveCase()
86 …ResolvedMethodDeclaration methodDeclaration = javaParserFacade.solve(callToFoo).getCorrespondingDe… in declaredOnMethodNegativeCase() local
87 ResolvedReferenceTypeDeclaration typeDeclaration = methodDeclaration.declaringType(); in declaredOnMethodNegativeCase()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/
DPrettyPrintVisitorTest.java116 MethodDeclaration methodDeclaration = (MethodDeclaration) cu.getType(0).getMember(0); in printLambdaIntersectionTypeAssignment() local
118 …nnable r = (Runnable & Serializable) (() -> {" + EOL + "});", print(methodDeclaration.getBody().ge… in printLambdaIntersectionTypeAssignment()
137 MethodDeclaration methodDeclaration = (MethodDeclaration) cu.getType(0).getMember(0); in printLambdaIntersectionTypeReturn() local
139 …rializable) (c1, c2) -> c1.getKey().compareTo(c2.getKey());", print(methodDeclaration.getBody().ge… in printLambdaIntersectionTypeReturn()
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/issue113/com/foo/
DWidget.java33 …MethodDeclaration methodDeclaration = compilationUnit.getNodesByType(MethodDeclaration.class).stre… in main() local
35 methodDeclaration.getNodesByType(MethodCallExpr.class).forEach(parserFacade::solve); in main()

12