ModuleDeclarationTreeImpl extends JavaTree implements ModuleDeclarationTree { @Override public void accept(TreeVisitor visitor) { visitor.visitModule(this); } ModuleDeclarationTreeImpl(List<AnnotationTree> annotations, @Nullable InternalSyntaxToken openKeyword, InternalSyntaxToken moduleKeyword, ModuleNameTree moduleName,
    InternalSyntaxToken openBraceToken, List<ModuleDirectiveTree> moduleDirectives, InternalSyntaxToken closeBraceToken); @Override void accept(TreeVisitor visitor); @Override Tree.Kind kind(); @Override List<AnnotationTree> annotations(); @Nullable @Override SyntaxToken openKeyword(); @Override SyntaxToken moduleKeyword(); @Override ModuleNameTree moduleName(); @Override SyntaxToken openBraceToken(); @Override List<ModuleDirectiveTree> moduleDirectives(); @Override SyntaxToken closeBraceToken();  }
@Test void test_BaseTreeVisitor() { CompilationUnitTree cut = JParserTestUtils.parseModule( "import org.foo.Bar;", "", "@Bar", "open module com.greetings {", "}"); ModuleDeclarationVisitor moduleDeclarationVisitor = new ModuleDeclarationVisitor(); cut.accept(moduleDeclarationVisitor); assertThat(moduleDeclarationVisitor.visited).isTrue(); assertThat(moduleDeclarationVisitor.annotations).hasSize(1); AnnotationTree annotation = moduleDeclarationVisitor.annotations.iterator().next(); assertThat(((IdentifierTree) annotation.annotationType()).name()).isEqualTo("Bar"); }