All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.java.ast.ASTModuleProvidesDirective Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.java.ast;

import net.sourceforge.pmd.lang.ast.NodeStream;

/**
 * A "provides" directive of a {@linkplain ASTModuleDeclaration module declaration}.
 *
 * 
 *
 * ModuleProvidesDirective ::=
 *     "provides" {@linkplain ASTClassType ClassType}
 *     "with" {@linkplain ASTClassType ClassType} ( "," {@linkplain ASTClassType ClassType} )*
 *     ";"
 *
 * 
*/ public final class ASTModuleProvidesDirective extends ASTModuleDirective { ASTModuleProvidesDirective(int id) { super(id); } @Override protected R acceptVisitor(JavaVisitor visitor, P data) { return visitor.visit(this, data); } /** * Returns the node representing the provided interface. */ public ASTClassType getService() { return firstChild(ASTClassType.class); } /** * Returns the nodes representing the service providers, that is, * the service implementations. */ public NodeStream getServiceProviders() { return children(ASTClassType.class).drop(1); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy