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

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

The newest version!
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

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

/**
 * A wrapper around a statement that assigns it a label.
 *
 * 
 *
 * LabeledStatement ::= <IDENTIFIER> ":" {@link ASTStatement Statement}
 *
 * 
*/ public final class ASTLabeledStatement extends AbstractStatement { ASTLabeledStatement(int id) { super(id); } @Override protected R acceptVisitor(JavaVisitor visitor, P data) { return visitor.visit(this, data); } /** * Returns the name of the label. */ public String getLabel() { return getImage(); } /** * Returned the statement named by this label. */ public ASTStatement getStatement() { return (ASTStatement) getChild(0); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy