ProvidesDirectiveTreeImpl extends ModuleDirectiveTreeImpl implements ProvidesDirectiveTree { @Override public void accept(TreeVisitor visitor) { visitor.visitProvidesDirective(this); } ProvidesDirectiveTreeImpl(InternalSyntaxToken providesKeyword, TypeTree typeName, InternalSyntaxToken withKeyword,
    ListTree<TypeTree> typeNames, InternalSyntaxToken semicolonToken); @Override void accept(TreeVisitor visitor); @Override Kind kind(); @Override TypeTree typeName(); @Override SyntaxToken withKeyword(); @Override ListTree<TypeTree> typeNames();  }
@Test void test_BaseTreeVisitor() { CompilationUnitTree cut = JParserTestUtils.parseModule( "import org.foo.Bar;", "", "@Bar", "open module com.greetings {", " exports org.bar to com.module1, module2;", " provides org.MyInterface with com.MyInterface, MyInterface2;", "}"); ProvidesDirectiveVisitor moduleDeclarationVisitor = new ProvidesDirectiveVisitor(); cut.accept(moduleDeclarationVisitor); assertThat(moduleDeclarationVisitor.visited).isTrue(); assertThat(moduleDeclarationVisitor.directives).hasSize(1); assertThat(moduleDeclarationVisitor.identifiers).containsExactly("Bar", "Bar", "com", "greetings", "MyInterface", "MyInterface", "MyInterface2"); }