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: * The primary suffix of the expression
16: *
17: * @author Mike Atkinson
18: * @since jRefactory 2.9.0, created October 16, 2003
19: */
20: public class ASTPrimarySuffix extends NamedNode {
21: //private String name = "";
22: private boolean isArguments;
23:
24: /**
25: * Constructor for the ASTPrimarySuffix node.
26: *
27: * @param identifier The id of this node (JJTPRIMARYSUFFIX).
28: */
29: public ASTPrimarySuffix(int identifier) {
30: super (identifier);
31: }
32:
33: /**
34: * Constructor for the ASTPrimarySuffix node.
35: *
36: * @param parser The JavaParser that created this ASTPrimarySuffix node.
37: * @param identifier The id of this node (JJTPRIMARYSUFFIX).
38: */
39: public ASTPrimarySuffix(JavaParser parser, int identifier) {
40: super (parser, identifier);
41: }
42:
43: /**
44: * Set the object's name
45: *
46: * @param newName the new name (should be "this" or "super" or <identifier>)
47: */
48: //public void setName(String newName) {
49: // name = newName.intern();
50: //}
51:
52: /**
53: * Set the object's name
54: *
55: * @param newName the new name (should be "this" or "super" or <identifier>)
56: */
57: public void setImage(String newName) {
58: setName(newName);
59: }
60:
61: /** Sets the isArguments attribute of the ASTPrimarySuffix node. */
62: public void setIsArguments() {
63: this .isArguments = true;
64: }
65:
66: /**
67: * Get the object's name
68: *
69: * @return the name (should be "this" or "super" or <identifier>) or null.
70: */
71: //public String getName() {
72: // return name;
73: //}
74:
75: /**
76: * Gets the arguments attribute of the ASTPrimarySuffix node.
77: *
78: * @return The arguments value
79: */
80: public boolean isArguments() {
81: return this .isArguments;
82: }
83:
84: /**
85: * Accept the visitor.
86: *
87: * @param visitor An implementation of JavaParserVisitor that processes the ASTPrimarySuffix node.
88: * @param data Some data being passed between the visitor methods.
89: * @return Usually the data parameter (possibly modified).
90: */
91: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
92: return visitor.visit(this, data);
93: }
94:
95: }
|