net.sourceforge.pmd.lang.java.ast.ASTModuleUsesDirective Maven / Gradle / Ivy
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast;
/**
* A "uses" directive of a {@linkplain ASTModuleDeclaration module declaration}.
*
*
*
* ModuleUsesDirective ::= "uses" <PACKAGE_NAME> ";"
*
*
*/
public final class ASTModuleUsesDirective extends ASTModuleDirective {
ASTModuleUsesDirective(int id) {
super(id);
}
@Override
protected R acceptVisitor(JavaVisitor super P, ? extends R> visitor, P data) {
return visitor.visit(this, data);
}
/**
* Returns the node representing the consumed service.
*/
public ASTClassOrInterfaceType getService() {
return firstChild(ASTClassOrInterfaceType.class);
}
}