1
2
3 package net.sourceforge.pmd.ast;
4
5 public class ASTPrimarySuffix extends SimpleNode {
6 public ASTPrimarySuffix(int id) {
7 super(id);
8 }
9
10 public ASTPrimarySuffix(JavaParser p, int id) {
11 super(p, id);
12 }
13
14 private boolean isArguments;
15 private boolean isArrayDereference;
16
17 public void setIsArrayDereference() {
18 isArrayDereference = true;
19 }
20
21 public boolean isArrayDereference() {
22 return isArrayDereference;
23 }
24
25 public void setIsArguments() {
26 this.isArguments = true;
27 }
28
29 public boolean isArguments() {
30 return this.isArguments;
31 }
32
33 public void dump(String prefix) {
34 String out = "";
35 if (isArrayDereference()) {
36 out += ":[";
37 }
38 if (this.getImage() != null) {
39 out += out.length() == 0 ? ":" + this.getImage() : this.getImage();
40 }
41 System.out.println(toString(prefix) + out);
42 dumpChildren(prefix);
43 }
44 /***
45 * Accept the visitor. *
46 */
47 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
48 return visitor.visit(this, data);
49 }
50 }