OpensDirectiveTreeImpl extends ModuleDirectiveTreeImpl implements OpensDirectiveTree { @Override public void accept(TreeVisitor visitor) { visitor.visitOpensDirective(this); } OpensDirectiveTreeImpl(InternalSyntaxToken opensKeyword, ExpressionTree packageName, @Nullable InternalSyntaxToken toKeyword, ListTree<ModuleNameTree> moduleNames,
    InternalSyntaxToken semicolonToken); @Override void accept(TreeVisitor visitor); @Override Kind kind(); @Override ExpressionTree packageName(); @Nullable @Override SyntaxToken toKeyword(); @Override ListTree<ModuleNameTree> moduleNames();  }
@Test void test_BaseTreeVisitor() { CompilationUnitTree cut = JParserTestUtils.parseModule( "@org.foo.Bar", "open module com.greetings {", " exports foo;", " requires org.gul;", " opens org.bar to com.module1, module2;", "}"); OpensDirectiveVisitor moduleDeclarationVisitor = new OpensDirectiveVisitor(); cut.accept(moduleDeclarationVisitor); assertThat(moduleDeclarationVisitor.visited).isTrue(); assertThat(moduleDeclarationVisitor.directives).hasSize(1); assertThat(moduleDeclarationVisitor.identifiers).containsExactly("com", "greetings", "com", "module1", "module2"); }