public CompilationUnitTreeImpl newCompilationUnit( JavaTree spacing, Optional<PackageDeclarationTree> packageDeclaration, Optional<List<ImportClauseTree>> importDeclarations, Optional<List<Tree>> typeDeclarations, InternalSyntaxToken eof) { ImmutableList.Builder<ImportClauseTree> imports = ImmutableList.builder(); if (importDeclarations.isPresent()) { for (ImportClauseTree child : importDeclarations.get()) { imports.add(child); } } ImmutableList.Builder<Tree> types = ImmutableList.builder(); if (typeDeclarations.isPresent()) { for (Tree child : typeDeclarations.get()) { types.add(child); } } return new CompilationUnitTreeImpl( packageDeclaration.orNull(), imports.build(), types.build(), eof); }
public CompilationUnitTreeImpl newCompilationUnit( JavaTree spacing, Optional<PackageDeclarationTree> packageDeclaration, Optional<List<ImportClauseTree>> importDeclarations, Optional<ModuleDeclarationTree> moduleDeclaration, Optional<List<Tree>> typeDeclarations, InternalSyntaxToken eof) { ImmutableList.Builder<ImportClauseTree> imports = ImmutableList.builder(); if (importDeclarations.isPresent()) { for (ImportClauseTree child : importDeclarations.get()) { imports.add(child); } } ImmutableList.Builder<Tree> types = ImmutableList.builder(); if (typeDeclarations.isPresent()) { for (Tree child : typeDeclarations.get()) { types.add(child); } } return new CompilationUnitTreeImpl( packageDeclaration.orNull(), imports.build(), types.build(), moduleDeclaration.orNull(), eof); }
public CompilationUnitTreeImpl newCompilationUnit( JavaTree spacing, Optional<PackageDeclarationTree> packageDeclaration, Optional<List<ImportClauseTree>> importDeclarations, Optional<ModuleDeclarationTree> moduleDeclaration, Optional<List<Tree>> typeDeclarations, InternalSyntaxToken eof) { ImmutableList.Builder<ImportClauseTree> imports = ImmutableList.builder(); if (importDeclarations.isPresent()) { for (ImportClauseTree child : importDeclarations.get()) { imports.add(child); } } ImmutableList.Builder<Tree> types = ImmutableList.builder(); if (typeDeclarations.isPresent()) { for (Tree child : typeDeclarations.get()) { types.add(child); } } return new CompilationUnitTreeImpl( packageDeclaration.orNull(), imports.build(), types.build(), moduleDeclaration.orNull(), eof); }
public void visitFile(@Nullable Tree parsedTree) { semanticModel = null; CompilationUnitTree tree = new JavaTree.CompilationUnitTreeImpl(null, new ArrayList<>(), new ArrayList<>(), null, null); boolean fileParsed = parsedTree != null; if (fileParsed && parsedTree.is(Tree.Kind.COMPILATION_UNIT)) {
return new CompilationUnitTreeImpl( packageDeclaration.orNull(), (List) importDeclarations.or(ImmutableList.<ImportTreeImpl>of()),
public void visitFile(@Nullable Tree parsedTree) { semanticModel = null; CompilationUnitTree tree = new JavaTree.CompilationUnitTreeImpl(null, Lists.<ImportClauseTree>newArrayList(), Lists.<Tree>newArrayList(), null); boolean fileParsed = parsedTree != null; if (fileParsed && parsedTree.is(Tree.Kind.COMPILATION_UNIT)) {
public void visitFile(@Nullable Tree parsedTree) { semanticModel = null; CompilationUnitTree tree = new JavaTree.CompilationUnitTreeImpl(null, new ArrayList<>(), new ArrayList<>(), null, null); boolean fileParsed = parsedTree != null; if (fileParsed && parsedTree.is(Tree.Kind.COMPILATION_UNIT)) {