/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/ |
D | ExprResolutionTest.java | 58 CompilationUnit compilationUnit = parse( in typeOfPlusExpressionsDoubleAndByte() local 67 List<BinaryExpr> bExprs = compilationUnit.findAll(BinaryExpr.class); in typeOfPlusExpressionsDoubleAndByte() 75 CompilationUnit compilationUnit = parse( in typeOfPlusExpressionsByteAndDouble() local 84 List<BinaryExpr> bExprs = compilationUnit.findAll(BinaryExpr.class); in typeOfPlusExpressionsByteAndDouble() 92 CompilationUnit compilationUnit = parse( in typeOfPlusExpressionsDoubleAndChar() local 101 List<BinaryExpr> bExprs = compilationUnit.findAll(BinaryExpr.class); in typeOfPlusExpressionsDoubleAndChar() 109 CompilationUnit compilationUnit = parse( in typeOfPlusExpressionsCharAndDouble() local 118 List<BinaryExpr> bExprs = compilationUnit.findAll(BinaryExpr.class); in typeOfPlusExpressionsCharAndDouble() 126 CompilationUnit compilationUnit = parse( in typeOfPlusExpressionsDoubleAndInt() local 135 List<BinaryExpr> bExprs = compilationUnit.findAll(BinaryExpr.class); in typeOfPlusExpressionsDoubleAndInt() [all …]
|
/external/javaparser/javaparser-core-testing-bdd/src/test/java/com/github/javaparser/steps/ |
D | ManipulationSteps.java | 127 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenThePackageDeclarationIsSetTo() local 128 compilationUnit.setPackageDeclaration(new PackageDeclaration(parseName(packageName))); in whenThePackageDeclarationIsSetTo() 129 state.put("cu1", compilationUnit); in whenThePackageDeclarationIsSetTo() 134 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenAClassCalledIsAddedToTheCompilationUnit() local 136 compilationUnit.setTypes(nodeList(type)); in whenAClassCalledIsAddedToTheCompilationUnit() 137 state.put("cu1", compilationUnit); in whenAClassCalledIsAddedToTheCompilationUnit() 142 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit() local 143 TypeDeclaration<?> type = compilationUnit.getType(position - 1); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit() 149 state.put("cu1", compilationUnit); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit() 154 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenVarargsCalledAreAddedToMethodInClass() local [all …]
|
D | SharedSteps.java | 91 CompilationUnit compilationUnit = parse(new File(url.toURI())); in whenTheJavaFileIsParsed() local 92 state.put("cu1", compilationUnit); in whenTheJavaFileIsParsed() 97 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheCompilationUnitIsEqualToTheSecondCompilationUnit() local 100 assertThat(compilationUnit, is(equalTo(compilationUnit2))); in thenTheCompilationUnitIsEqualToTheSecondCompilationUnit() 105 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheCompilationUnitHasTheSameHashcodeToTheSecondCompilationUnit() local 108 assertThat(compilationUnit.hashCode(), is(equalTo(compilationUnit2.hashCode()))); in thenTheCompilationUnitHasTheSameHashcodeToTheSecondCompilationUnit() 113 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheCompilationUnitIsNotEqualToTheSecondCompilationUnit() local 116 assertThat(compilationUnit, not(equalTo(compilationUnit2))); in thenTheCompilationUnitIsNotEqualToTheSecondCompilationUnit() 121 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheCompilationUnitHasADifferentHashcodeToTheSecondCompilationUnit() local 124 assertThat(compilationUnit.hashCode(), not(equalTo(compilationUnit2.hashCode()))); in thenTheCompilationUnitHasADifferentHashcodeToTheSecondCompilationUnit() [all …]
|
D | CommentParsingSteps.java | 60 private CompilationUnit compilationUnit; field in CommentParsingSteps 101 compilationUnit = result.getResult().get(); in whenTheClassIsParsedByTheJavaParser() 204 assertThat(prettyPrinter.print(compilationUnit).trim(), is(src.trim())); in isPrintedAs() 209 assertEquals(false, compilationUnit.getComment().isPresent()); in thenTheCompilationUnitIsNotCommented() 214 assertThat(compilationUnit.getComment().get().getContent(), is(expectedContent)); in thenTheCompilationIsCommentedCompilationUnitComment() 219 assertThat(compilationUnit.getComments().size(), is(expectedCount)); in thenTheCompilationUnitHasContainedComments() 224 assertThat(compilationUnit.getOrphanComments().size(), is(expectedCount)); in thenTheCompilationUnitHasExpectedCountOrphanComments() 229 Comment commentUnderTest = compilationUnit.getOrphanComments().get(position - 1); in thenTheCompilationUnitOrphanCommentIs() 235 … Comment commentUnderTest = compilationUnit.getAllContainedComments().get(commentPosition - 1); in thenCommentInCompilationUnitIsNotAnOrphan() 241 … Comment commentUnderTest = compilationUnit.getAllContainedComments().get(commentPosition - 1); in thenCommentInCompilationUnitIsAnOrphan() [all …]
|
D | VisitorSteps.java | 115 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenTheSecondCompilationUnitIsCloned() local 116 …CompilationUnit compilationUnit2 = (CompilationUnit) compilationUnit.accept(new CloneVisitor(), nu… in whenTheSecondCompilationUnitIsCloned() 122 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenTheCompilationUnitIsVisitedByTheVistor() local 123 toUpperCaseVariableNameVisitor.visit(compilationUnit, null); in whenTheCompilationUnitIsVisitedByTheVistor() 124 state.put("cu1", compilationUnit); in whenTheCompilationUnitIsVisitedByTheVistor() 129 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenTheCompilationUnitIsVisitedByTheVariableNameCollectorVisitor() local 131 collectVariableNameVisitor.visit(compilationUnit, collectedVariableName); in whenTheCompilationUnitIsVisitedByTheVariableNameCollectorVisitor() 136 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenTheCompilationUnitIsVisitedByTheVisitorThatReturnsVariableNames() local 137 returnedVariableName = nameReturningVisitor.visit(compilationUnit, null); in whenTheCompilationUnitIsVisitedByTheVisitorThatReturnsVariableNames() 142 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenTheCompilationUnitIsVisitedByTheVisitorThatReturnsAllVariableNames() local [all …]
|
D | ParsingSteps.java | 97 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheConstructorDeclarationAsAStringIs() local 98 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenTheConstructorDeclarationAsAStringIs() 105 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenConstructorInClassDeclarationShortFormAsAStringIs() local 106 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenConstructorInClassDeclarationShortFormAsAStringIs() 113 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenMethod1InClass1DeclarationAsAStringIs() local 114 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenMethod1InClass1DeclarationAsAStringIs() 121 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenMethodInClassDeclarationAsAStringShortFormIs() local 122 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenMethodInClassDeclarationAsAStringShortFormIs() 129 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenFieldInClassContainsAnnotationValueIs() local 131 TypeDeclaration<?> classUnderTest = compilationUnit.getType(classPosition - 1); in thenFieldInClassContainsAnnotationValueIs() [all …]
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/javassistmodel/ |
D | JavassistClassDeclarationTest.java | 70 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsClass() local 71 assertTrue(compilationUnit.isClass()); in testIsClass() 76 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsInterface() local 77 assertFalse(compilationUnit.isInterface()); in testIsInterface() 82 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsEnum() local 83 assertFalse(compilationUnit.isEnum()); in testIsEnum() 88 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsTypeVariable() local 89 assertFalse(compilationUnit.isTypeParameter()); in testIsTypeVariable() 94 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsType() local 95 assertTrue(compilationUnit.isType()); in testIsType() [all …]
|
D | JavassistTypeParameterDeclarationTest.java | 46 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testGetBounds() local 47 assertTrue(compilationUnit.isClass()); in testGetBounds() 49 for (ResolvedMethodDeclaration method : compilationUnit.getDeclaredMethods()) { in testGetBounds() 69 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("java… in testGetComplexBounds() local 70 assertTrue(compilationUnit.isClass()); in testGetComplexBounds() 72 for (ResolvedMethodDeclaration method : compilationUnit.getDeclaredMethods()) { in testGetComplexBounds()
|
D | JavassistInterfaceDeclarationTest.java | 131 …JavassistInterfaceDeclaration compilationUnit = (JavassistInterfaceDeclaration) anotherTypeSolver.… in testHasDirectlyAnnotation() local 132 … assertTrue(compilationUnit.hasDirectlyAnnotation("com.github.javaparser.test.TestAnnotation")); in testHasDirectlyAnnotation() 137 …JavassistInterfaceDeclaration compilationUnit = (JavassistInterfaceDeclaration) anotherTypeSolver.… in testHasAnnotation() local 138 assertTrue(compilationUnit.hasAnnotation("com.github.javaparser.test.TestAnnotation")); in testHasAnnotation()
|
D | JavassistEnumDeclarationTest.java | 132 …ResolvedEnumDeclaration compilationUnit = (ResolvedEnumDeclaration) anotherTypeSolver.solveType("c… in testHasDirectlyAnnotation() local 133 … assertTrue(compilationUnit.hasDirectlyAnnotation("com.github.javaparser.test.TestAnnotation")); in testHasDirectlyAnnotation() 138 …ResolvedEnumDeclaration compilationUnit = (ResolvedEnumDeclaration) anotherTypeSolver.solveType("c… in testHasAnnotation() local 139 assertTrue(compilationUnit.hasAnnotation("com.github.javaparser.test.TestAnnotation")); in testHasAnnotation()
|
/external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/ |
D | VisitorGenerator.java | 41 …final CompilationUnit compilationUnit = sourceRoot.tryToParse(pkg, visitorClassName + ".java").get… in generate() local 43 …Optional<ClassOrInterfaceDeclaration> visitorClassOptional = compilationUnit.getClassByName(visito… in generate() 45 visitorClassOptional = compilationUnit.getInterfaceByName(visitorClassName); in generate() 51 .forEach(node -> generateVisitMethodForNode(node, visitorClass, compilationUnit)); in generate() 59 …aseNodeMetaModel node, ClassOrInterfaceDeclaration visitorClass, CompilationUnit compilationUnit) { in generateVisitMethodForNode() argument 66 generateVisitMethodBody(node, existingVisitMethod.get(), compilationUnit); in generateVisitMethodForNode() 77 generateVisitMethodBody(node, newVisitMethod, compilationUnit); in generateVisitMethodForNode() 81 …MethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit); in generateVisitMethodBody() argument
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/javaparsermodel/declarations/ |
D | JavaParserClassDeclarationTest.java | 90 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsClass() local 91 assertTrue(compilationUnit.isClass()); in testIsClass() 96 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsInterface() local 97 assertFalse(compilationUnit.isInterface()); in testIsInterface() 102 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsEnum() local 103 assertFalse(compilationUnit.isEnum()); in testIsEnum() 108 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsTypeVariable() local 109 assertFalse(compilationUnit.isTypeParameter()); in testIsTypeVariable() 114 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsType() local 115 assertTrue(compilationUnit.isType()); in testIsType() [all …]
|
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/builders/ |
D | NodeWithMembersBuildersTest.java | 135 CompilationUnit compilationUnit = new CompilationUnit(); in testAddPrivateFieldWithType() local 136 … ClassOrInterfaceDeclaration classOrInterfaceDeclaration = compilationUnit.addClass("Person"); in testAddPrivateFieldWithType() 150 CompilationUnit compilationUnit = new CompilationUnit(); in testAddPublicFieldWithType() local 151 … ClassOrInterfaceDeclaration classOrInterfaceDeclaration = compilationUnit.addClass("Person"); in testAddPublicFieldWithType() 165 CompilationUnit compilationUnit = new CompilationUnit(); in testAddProtectedFieldWithType() local 166 … ClassOrInterfaceDeclaration classOrInterfaceDeclaration = compilationUnit.addClass("Person"); in testAddProtectedFieldWithType() 180 CompilationUnit compilationUnit = new CompilationUnit(); in testClassWithInitializersWithString() local 181 … ClassOrInterfaceDeclaration classOrInterfaceDeclaration = compilationUnit.addClass("Person"); in testClassWithInitializersWithString() 199 CompilationUnit compilationUnit = new CompilationUnit(); in testClassWithInitializersWithClass() local 200 … ClassOrInterfaceDeclaration classOrInterfaceDeclaration = compilationUnit.addClass("Person"); in testClassWithInitializersWithClass()
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/ |
D | Issue2035Test.java | 61 parseResult.getResult().ifPresent(compilationUnit -> { in test() 62 final List<MethodCallExpr> matches = compilationUnit in test() 99 parseResult.getResult().ifPresent(compilationUnit -> { in test_int() 100 final List<MethodCallExpr> matches = compilationUnit in test_int() 139 parseResult.getResult().ifPresent(compilationUnit -> { in test_Integer() 140 final List<MethodCallExpr> matches = compilationUnit in test_Integer()
|
D | Issue1814Test.java | 35 final CompilationUnit compilationUnit = new CompilationUnit(); in setup() local 36 compilationUnit.setPackageDeclaration("java.lang"); in setup() 38 …final ClassOrInterfaceDeclaration clazz = compilationUnit.addClass("Object", Modifier.Keyword.PUBL… in setup()
|
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/ |
D | TransformationsTest.java | 209 …CompilationUnit compilationUnit = LexicalPreservingPrinter.setup(StaticJavaParser.parse("public cl… in addingStatement1() local 215 …claration classOrInterfaceDeclaration = (ClassOrInterfaceDeclaration)compilationUnit.getChildNodes… in addingStatement1() 219 String s = LexicalPreservingPrinter.print(compilationUnit); in addingStatement1() 239 …CompilationUnit compilationUnit = LexicalPreservingPrinter.setup(StaticJavaParser.parse("public cl… in addingStatement2() local 245 …claration classOrInterfaceDeclaration = (ClassOrInterfaceDeclaration)compilationUnit.getChildNodes… in addingStatement2() 249 String s = LexicalPreservingPrinter.print(compilationUnit); in addingStatement2() 269 …CompilationUnit compilationUnit = LexicalPreservingPrinter.setup(StaticJavaParser.parse("public cl… in addingStatement3() local 275 …claration classOrInterfaceDeclaration = (ClassOrInterfaceDeclaration)compilationUnit.getChildNodes… in addingStatement3() 279 String s = LexicalPreservingPrinter.print(compilationUnit); in addingStatement3()
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/utils/ |
D | SymbolSolverCollectionStrategyTest.java | 28 parseResult.ifSuccessful(compilationUnit -> { in resolveExpressions() 29 for (MethodDeclaration expr : compilationUnit.findAll(MethodDeclaration.class)) { in resolveExpressions() 36 …Log.error(e, "Unable to resolve %s from %s", () -> expr, () -> compilationUnit.getStorage().get().… in resolveExpressions()
|
/external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/core/visitor/ |
D | GenericListVisitorAdapterGenerator.java | 26 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument 51 compilationUnit.getImports().stream().noneMatch( in generateVisitMethodBody() 54 ).forEach(compilationUnit::addImport); in generateVisitMethodBody()
|
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typesolvers/ |
D | JavaParserTypeSolver.java | 204 Optional<CompilationUnit> compilationUnit = parse(srcFile); 205 if (compilationUnit.isPresent()) { 206 …ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit.get(), typeNa… 217 for (CompilationUnit compilationUnit : compilationUnits) { 218 …ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit, typeName.toS…
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/resolution/typesolvers/ |
D | JavaParserTypeSolver.java | 133 CompilationUnit compilationUnit = parse(srcFile); in tryToSolveTypeUncached() local 134 …er.ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit, typeName); in tryToSolveTypeUncached() 144 for (CompilationUnit compilationUnit : compilationUnits) { in tryToSolveTypeUncached() 145 …er.ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit, typeName); in tryToSolveTypeUncached()
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/ |
D | CompilationUnit.java | 611 private final CompilationUnit compilationUnit; field in CompilationUnit.Storage 617 private Storage(CompilationUnit compilationUnit, Path path) { in Storage() argument 618 this.compilationUnit = compilationUnit; in Storage() 623 private Storage(CompilationUnit compilationUnit, Path path, Charset encoding) { in Storage() argument 624 this.compilationUnit = compilationUnit; in Storage() 640 return compilationUnit; in getCompilationUnit() 656 …final Optional<String> pkgAsString = compilationUnit.getPackageDeclaration().map(NodeWithName::get… in getSourceRoot()
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/ |
D | SourceRoot.java | 394 public SourceRoot add(String startPackage, String filename, CompilationUnit compilationUnit) { in add() argument 397 assertNotNull(compilationUnit); in add() 401 compilationUnit, in add() 412 public SourceRoot add(CompilationUnit compilationUnit) { in add() argument 413 assertNotNull(compilationUnit); in add() 414 if (compilationUnit.getStorage().isPresent()) { in add() 415 final Path path = compilationUnit.getStorage().get().getPath(); in add() 418 compilationUnit, in add()
|
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ast/body/ |
D | FieldDeclarationTest.java | 12 CompilationUnit compilationUnit = parse("" + in wofjweoifj() local 17 BodyDeclaration<?> declaration = compilationUnit.getType(0).getMembers().get(0); in wofjweoifj()
|
/external/icu/tools/srcgen/currysrc/src/main/java/com/google/currysrc/api/process/ast/ |
D | PackageMatcher.java | 59 CompilationUnit compilationUnit = (CompilationUnit) node.getRoot(); in getPackageName() local 60 PackageDeclaration packageDeclaration = compilationUnit.getPackage(); in getPackageName()
|
/external/javaparser/javaparser-core-testing/src/test/resources/com/github/javaparser/issue_samples/ |
D | Issue290.java.txt | 23 CompilationUnit compilationUnit = JavaParser.parse(in); 31 }.visit(compilationUnit, null);
|