net.sourceforge.pmd.lang.java.ast.ASTSwitchArrowBranch 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 non-fallthrough switch rule, introduced with switch expressions.
* See {@link ASTSwitchLike}.
*
*
*
* SwitchLabeledExpression ::= {@link ASTSwitchLabel SwitchLabel} "->" {@link ASTSwitchArrowRHS SwitchArrowRHS}
*
*
*/
public final class ASTSwitchArrowBranch extends AbstractJavaNode implements ASTSwitchBranch {
ASTSwitchArrowBranch(int id) {
super(id);
}
@Override
protected R acceptVisitor(JavaVisitor super P, ? extends R> visitor, P data) {
return visitor.visit(this, data);
}
/** Returns the right hand side of the arrow. */
public ASTSwitchArrowRHS getRightHandSide() {
return (ASTSwitchArrowRHS) getLastChild();
}
}