01: /*
02: * Author: Mike Atkinson
03: *
04: * This software has been developed under the copyleft
05: * rules of the GNU General Public License. Please
06: * consult the GNU General Public License for more
07: * details about use and distribution of this software.
08: */
09: package net.sourceforge.jrefactory.ast;
10:
11: import net.sourceforge.jrefactory.parser.JavaParser;
12: import net.sourceforge.jrefactory.parser.JavaParserVisitor;
13:
14: /**
15: * Contains a break statement. The break statement can contain a label. The label is referred to the name of the
16: * statement.
17: *
18: * @author Mike Atkinson
19: * @since jRefactory 2.9.0, created October 16, 2003
20: */
21: public class ASTBreakStatement extends NamedNode {
22: //private String name = "";
23:
24: /**
25: * Constructor for the ASTBreakStatement node.
26: *
27: * @param identifier identifier The id of this node (JJTBREAKSTATEMENT).
28: */
29: public ASTBreakStatement(int identifier) {
30: super (identifier);
31: }
32:
33: /**
34: * Constructor for the ASTBreakStatement node.
35: *
36: * @param parser The JavaParser that created this ASTBreakStatement node.
37: * @param identifier The id of this node (JJTBREAKSTATEMENT).
38: */
39: public ASTBreakStatement(JavaParser parser, int identifier) {
40: super (parser, identifier);
41: }
42:
43: /**
44: * Set the break statements's target name.
45: *
46: * This is the optional label that follows the <code>break</code>.
47: *
48: * @param newName the new name.
49: */
50: //public void setName(String newName) {
51: // name = newName.intern();
52: //}
53:
54: /**
55: * Get the break statements's target name.
56: *
57: * @return the name (may be null if there was no optional label).
58: */
59: //public String getName() {
60: // return name;
61: //}
62:
63: /**
64: * Accept the visitor.
65: *
66: * @param visitor An implementation of JavaParserVisitor that processes the ASTBreakStatement node.
67: * @param data Some data being passed between the visitor methods.
68: * @return Usually the data parameter (possibly modified).
69: */
70: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
71: return visitor.visit(this, data);
72: }
73: }
|