Home
last modified time | relevance | path

Searched refs:compilationUnit (Results 1 – 25 of 46) sorted by relevance

12

/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/bdd/steps/
DManipulationSteps.java128 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenThePackageDeclarationIsSetTo() local
129 compilationUnit.setPackageDeclaration(new PackageDeclaration(parseName(packageName))); in whenThePackageDeclarationIsSetTo()
130 state.put("cu1", compilationUnit); in whenThePackageDeclarationIsSetTo()
135 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenAClassCalledIsAddedToTheCompilationUnit() local
137 compilationUnit.setTypes(nodeList(type)); in whenAClassCalledIsAddedToTheCompilationUnit()
138 state.put("cu1", compilationUnit); in whenAClassCalledIsAddedToTheCompilationUnit()
143 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit() local
144 TypeDeclaration<?> type = compilationUnit.getType(position - 1); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit()
150 state.put("cu1", compilationUnit); in whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit()
155 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in whenVarargsCalledAreAddedToMethodInClass() local
[all …]
DSharedSteps.java91 CompilationUnit compilationUnit = JavaParser.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 …]
DCommentParsingSteps.java63 private CompilationUnit compilationUnit; field in CommentParsingSteps
100 compilationUnit = result.getResult().get(); in whenTheClassIsParsedByTheJavaParser()
203 assertThat(prettyPrinter.print(compilationUnit).trim(), is(src.trim())); in isPrintedAs()
208 assertEquals(false, compilationUnit.getComment().isPresent()); in thenTheCompilationUnitIsNotCommented()
213 assertThat(compilationUnit.getComment().get().getContent(), is(expectedContent)); in thenTheCompilationIsCommentedCompilationUnitComment()
218 assertThat(compilationUnit.getComments().size(), is(expectedCount)); in thenTheCompilationUnitHasContainedComments()
223 assertThat(compilationUnit.getOrphanComments().size(), is(expectedCount)); in thenTheCompilationUnitHasExpectedCountOrphanComments()
228 Comment commentUnderTest = compilationUnit.getOrphanComments().get(position - 1); in thenTheCompilationUnitOrphanCommentIs()
234 … Comment commentUnderTest = compilationUnit.getAllContainedComments().get(commentPosition - 1); in thenCommentInCompilationUnitIsNotAnOrphan()
240 … Comment commentUnderTest = compilationUnit.getAllContainedComments().get(commentPosition - 1); in thenCommentInCompilationUnitIsAnOrphan()
[all …]
DVisitorSteps.java115 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 …]
DParsingSteps.java96 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenTheConstructorDeclarationAsAStringIs() local
97 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenTheConstructorDeclarationAsAStringIs()
104 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenConstructorInClassDeclarationShortFormAsAStringIs() local
105 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenConstructorInClassDeclarationShortFormAsAStringIs()
112 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenMethod1InClass1DeclarationAsAStringIs() local
113 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenMethod1InClass1DeclarationAsAStringIs()
120 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenMethodInClassDeclarationAsAStringShortFormIs() local
121 …ClassOrInterfaceDeclaration clazz = (ClassOrInterfaceDeclaration) compilationUnit.getType(classPos… in thenMethodInClassDeclarationAsAStringShortFormIs()
128 CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1"); in thenFieldInClassContainsAnnotationValueIs() local
130 TypeDeclaration<?> classUnderTest = compilationUnit.getType(classPosition - 1); in thenFieldInClassContainsAnnotationValueIs()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/javassistmodel/
DJavassistClassDeclarationTest.java55 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsClass() local
56 assertEquals(true, compilationUnit.isClass()); in testIsClass()
61 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsInterface() local
62 assertEquals(false, compilationUnit.isInterface()); in testIsInterface()
67 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsEnum() local
68 assertEquals(false, compilationUnit.isEnum()); in testIsEnum()
73 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsTypeVariable() local
74 assertEquals(false, compilationUnit.isTypeParameter()); in testIsTypeVariable()
79 …JavassistClassDeclaration compilationUnit = (JavassistClassDeclaration) typeSolver.solveType("com.… in testIsType() local
80 assertEquals(true, compilationUnit.isType()); in testIsType()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/javaparsermodel/declarations/
DJavaParserClassDeclarationTest.java87 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsClass() local
88 assertEquals(true, compilationUnit.isClass()); in testIsClass()
93 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsInterface() local
94 assertEquals(false, compilationUnit.isInterface()); in testIsInterface()
99 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsEnum() local
100 assertEquals(false, compilationUnit.isEnum()); in testIsEnum()
105 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsTypeVariable() local
106 assertEquals(false, compilationUnit.isTypeParameter()); in testIsTypeVariable()
111 …JavaParserClassDeclaration compilationUnit = (JavaParserClassDeclaration) typeSolver.solveType("co… in testIsType() local
112 assertEquals(true, compilationUnit.isType()); in testIsType()
[all …]
/external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/
DVisitorGenerator.java41 …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/utils/
DSymbolSolverQuickSetupTest.java38 sourceRoot.getCompilationUnits().forEach(compilationUnit -> in notResolve()
39compilationUnit.findAll(ClassOrInterfaceDeclaration.class).forEach(ClassOrInterfaceDeclaration::re… in notResolve()
47 sourceRoot.getCompilationUnits().forEach(compilationUnit -> in resolve()
48compilationUnit.findAll(ClassOrInterfaceDeclaration.class).forEach(ClassOrInterfaceDeclaration::re… in resolve()
/external/v8/tools/
Dparse-processor.js1087 let compilationUnit = this.processCompile(...arguments);
1088 compilationUnit.isEval = true;
1093 let compilationUnit = this.lookupScript(scriptId);
1095 compilationUnit =
1096 compilationUnit.getFunktionAtStartPosition(startPosition);
1097 if (compilationUnit === undefined) {
1103 compilationUnit.optimizationTimestamp = startOf(timestamp, duration);
1104 compilationUnit.optimizationDuration = duration;
1109 let compilationUnit = this.lookupScript(scriptId);
1111 compilationUnit.bytesTotal = endPosition;
[all …]
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typesolvers/
DJavaParserTypeSolver.java155 Optional<CompilationUnit> compilationUnit = parse(srcFile);
156 if (compilationUnit.isPresent()) {
157 …ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit.get(), typeNa…
166 for (CompilationUnit compilationUnit : compilationUnits) {
167 …er.ast.body.TypeDeclaration<?>> astTypeDeclaration = Navigator.findType(compilationUnit, typeName);
/external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/core/visitor/
DGenericListVisitorAdapterGenerator.java26 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument
51 compilationUnit.getImports().stream().noneMatch( in generateVisitMethodBody()
54 ).forEach(compilationUnit::addImport); in generateVisitMethodBody()
DVoidVisitorGenerator.java18 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument
DGenericVisitorGenerator.java18 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument
DGenericVisitorWithDefaultsGenerator.java19 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument
DVoidVisitorWithDefaultsGenerator.java19 …ethodBody(BaseNodeMetaModel node, MethodDeclaration visitMethod, CompilationUnit compilationUnit) { in generateVisitMethodBody() argument
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/
DSourceRoot.java378 public SourceRoot add(String startPackage, String filename, CompilationUnit compilationUnit) { in add() argument
381 assertNotNull(compilationUnit); in add()
385 compilationUnit, in add()
397 public SourceRoot add(CompilationUnit compilationUnit) { in add() argument
398 assertNotNull(compilationUnit); in add()
399 if (compilationUnit.getStorage().isPresent()) { in add()
400 final Path path = compilationUnit.getStorage().get().getPath(); in add()
403 compilationUnit, in add()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/ast/body/
DFieldDeclarationTest.java12 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/
DPackageMatcher.java59 CompilationUnit compilationUnit = (CompilationUnit) node.getRoot(); in getPackageName() local
60 PackageDeclaration packageDeclaration = compilationUnit.getPackage(); in getPackageName()
/external/javaparser/javaparser-testing/src/test/resources/com/github/javaparser/issue_samples/
DIssue290.java.txt23 CompilationUnit compilationUnit = JavaParser.parse(in);
31 }.visit(compilationUnit, null);
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/issue113/com/foo/
DWidget.java30 CompilationUnit compilationUnit = JavaParser.parse(new File(CLASS)); in main() local
33 …MethodDeclaration methodDeclaration = compilationUnit.getNodesByType(MethodDeclaration.class).stre… in main()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/
DCompilationUnit.java578 private final CompilationUnit compilationUnit; field in CompilationUnit.Storage
582 private Storage(CompilationUnit compilationUnit, Path path) { in Storage() argument
583 this.compilationUnit = compilationUnit; in Storage()
598 return compilationUnit; in getCompilationUnit()
607 …final Optional<String> pkgAsString = compilationUnit.getPackageDeclaration().map(NodeWithName::get… in getSourceRoot()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/ast/
DCompilationUnitTest.java38 CompilationUnit compilationUnit = parse("// This is my class, with my comment\n" + in issue578TheFirstCommentIsWithinTheCompilationUnit() local
43 assertEquals(1, compilationUnit.getAllContainedComments().size()); in issue578TheFirstCommentIsWithinTheCompilationUnit()
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionClassDeclarationTest.java307 …ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("… in testGetSuperclassWithoutTypeParameters() local
308 …assertEquals("com.github.javaparser.ast.Node", compilationUnit.getSuperClass().getQualifiedName()); in testGetSuperclassWithoutTypeParameters()
313 …ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("… in testGetSuperclassWithTypeParameters() local
314 …assertEquals("com.github.javaparser.ast.body.CallableDeclaration", compilationUnit.getSuperClass()… in testGetSuperclassWithTypeParameters()
315 …assertEquals("com.github.javaparser.ast.body.ConstructorDeclaration", compilationUnit.getSuperClas… in testGetSuperclassWithTypeParameters()
352 …ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("… in testGetInterfacesWithoutParameters() local
353 …assertEquals(ImmutableSet.of(), compilationUnit.getInterfaces().stream().map(i -> i.getQualifiedNa… in testGetInterfacesWithoutParameters()
409 …ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("… in testGetAllInterfacesWithoutParameters() local
413compilationUnit.getAllInterfaces().stream().map(i -> i.getQualifiedName()).sorted().collect(Collec… in testGetAllInterfacesWithoutParameters()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparser/
DNavigator.java155 …c ClassOrInterfaceDeclaration demandClassOrInterface(CompilationUnit compilationUnit, String quali… in demandClassOrInterface() argument
156 return findType(compilationUnit, qualifiedName) in demandClassOrInterface()

12