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: * Description of the Class
16: *
17: * @author Mike Atkinson
18: * @since jRefactory 2.9.0, created October 16, 2003
19: */
20: public class ASTReferenceType extends ASTType {
21: private int arrayCount;
22:
23: /**
24: * Constructor for the ASTReferenceType node.
25: *
26: * @param identifier The id of this node (JJTREFERENCETYPE).
27: */
28: public ASTReferenceType(int identifier) {
29: super (identifier);
30: }
31:
32: /**
33: * Constructor for the ASTReferenceType node.
34: *
35: * @param parser The JavaParser that created this ASTReferenceType node.
36: * @param identifier The id of this node (JJTREFERENCETYPE).
37: */
38: public ASTReferenceType(JavaParser parser, int identifier) {
39: super (parser, identifier);
40: }
41:
42: /**
43: * Set the number of indirection for the array
44: *
45: * @param count The new arrayCount value
46: */
47: public void setArrayCount(int count) {
48: arrayCount = count;
49: }
50:
51: /**
52: * Get the number of indirection for the array
53: *
54: * @return the count
55: */
56: public int getArrayCount() {
57: return arrayCount;
58: }
59:
60: /*
61: public String getImage() {
62: if (jjtGetNumChildren()>0) {
63: String x = ((SimpleNode)jjtGetFirstChild()).getName();
64: for (int i=0; i<arrayCount; i++) {
65: x = x + "[]";
66: }
67: return x;
68: } else {
69: return "";
70: }
71: }
72: */
73: /**
74: * Accept the visitor. *
75: *
76: * @param visitor An implementation of JavaParserVisitor that processes the ASTReferenceType node.
77: * @param data Some data being passed between the visitor methods.
78: * @return Usually the data parameter (possibly modified).
79: */
80: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
81: return visitor.visit(this, data);
82: }
83: }
|