RequiresDirectiveTreeImpl extends ModuleDirectiveTreeImpl implements RequiresDirectiveTree { @Override public void accept(TreeVisitor visitor) { visitor.visitRequiresDirectiveTree(this); } RequiresDirectiveTreeImpl(InternalSyntaxToken requiresKeyword, ModifiersTree modifiers, ModuleNameTree moduleName, InternalSyntaxToken semicolonToken); @Override void accept(TreeVisitor visitor); @Override Kind kind(); @Override ModifiersTree modifiers(); @Override ModuleNameTree moduleName();  }
@Test void test_BaseTreeVisitor() { CompilationUnitTree cut = JParserTestUtils.parseModule( "@org.foo.Bar", "open module com.greetings {", " requires static transitive bos.gul;", " requires gla.qix;", "}"); RequiresDirectiveVisitor moduleDeclarationVisitor = new RequiresDirectiveVisitor(); cut.accept(moduleDeclarationVisitor); assertThat(moduleDeclarationVisitor.visited).isTrue(); assertThat(moduleDeclarationVisitor.directives).hasSize(2); assertThat(moduleDeclarationVisitor.identifiers).containsExactly("com", "greetings", "bos", "gul", "gla", "qix"); }