/* * ContinueStatement.java 1.0 * * * Jun 20, 1997 mich * Sep 29, 1997 bv * Oct 11, 1997 mich * * @see io.devnulllabs.openjava.ptree.ParseTree * @version 1.0 last updated: Oct 11, 1997 * @author Michiaki Tatsubori */ package io.devnulllabs.openjava.ptree; import io.devnulllabs.openjava.ptree.util.ParseTreeVisitor; /** * The ContinueStatement class represents * a continue statement node of parse tree. * * @see io.devnulllabs.openjava.ptree.ParseTree * @see io.devnulllabs.openjava.ptree.NonLeaf * @see io.devnulllabs.openjava.ptree.Statement */ public class ContinueStatement extends NonLeaf implements Statement { /** * Allocates a new ContinueStatement object. * * @param label the label name. */ public ContinueStatement(String label) { super(); set(label); } /** * Allocates a new ContinueStatement object. * */ public ContinueStatement() { this(null); } /** * Gets the label of this break statement. * * @return the label name. * If there is no label then this method returns null. */ public String getLabel() { return (String) elementAt(0); } /** * Sets the label of this break statement. * * @param label the label. */ public void setLabel(String label) { setElementAt(label, 0); } public void accept(ParseTreeVisitor v) throws ParseTreeException { v.visit(this); } }