01: /* Generated By:JJTree: Do not edit this line. ASTPrimaryPrefix.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: public class ASTPrimaryPrefix extends SimpleJavaNode {
06: public ASTPrimaryPrefix(int id) {
07: super (id);
08: }
09:
10: public ASTPrimaryPrefix(JavaParser p, int id) {
11: super (p, id);
12: }
13:
14: private boolean usesThisModifier;
15: private boolean usesSuperModifier;
16:
17: public void setUsesThisModifier() {
18: usesThisModifier = true;
19: }
20:
21: public boolean usesThisModifier() {
22: return this .usesThisModifier;
23: }
24:
25: public void setUsesSuperModifier() {
26: usesSuperModifier = true;
27: }
28:
29: public boolean usesSuperModifier() {
30: return this .usesSuperModifier;
31: }
32:
33: public void dump(String prefix) {
34: String out = getImage();
35: if (usesSuperModifier) {
36: out = "super." + out;
37: } else if (usesThisModifier) {
38: if (getImage() == null) {
39: out = "this";
40: } else {
41: out = "this." + out;
42: }
43: }
44:
45: if (out == null) {
46: System.out.println(toString(prefix));
47: } else {
48: System.out.println(toString(prefix) + ":" + out);
49: }
50: dumpChildren(prefix);
51: }
52:
53: /**
54: * Accept the visitor. *
55: */
56: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
57: return visitor.visit(this, data);
58: }
59: }
|