|
1 |
| package net.sourceforge.pmd.ast; |
|
2 |
| |
|
3 |
| public class SimpleJavaNode extends SimpleNode implements JavaNode { |
|
4 |
| |
|
5 |
84409
| public SimpleJavaNode(JavaParser p, int i) {
|
|
6 |
84409
| super(p, i);
|
|
7 |
| } |
|
8 |
| |
|
9 |
23803
| public SimpleJavaNode(int i) {
|
|
10 |
23803
| super(i);
|
|
11 |
| } |
|
12 |
| |
|
13 |
84409
| public void jjtOpen() {
|
|
14 |
84409
| if (beginLine == -1 && parser.token.next != null) {
|
|
15 |
84409
| beginLine = parser.token.next.beginLine;
|
|
16 |
84409
| beginColumn = parser.token.next.beginColumn;
|
|
17 |
| } |
|
18 |
| } |
|
19 |
| |
|
20 |
47131
| public void jjtClose() {
|
|
21 |
47131
| if (beginLine == -1 && (children == null || children.length == 0)) {
|
|
22 |
0
| beginColumn = parser.token.beginColumn;
|
|
23 |
| } |
|
24 |
47131
| if (beginLine == -1) {
|
|
25 |
0
| beginLine = parser.token.beginLine;
|
|
26 |
| } |
|
27 |
47131
| endLine = parser.token.endLine;
|
|
28 |
47131
| endColumn = parser.token.endColumn;
|
|
29 |
| } |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
0
| public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
|
35 |
0
| return visitor.visit(this, data);
|
|
36 |
| } |
|
37 |
| |
|
38 |
| |
|
39 |
| |
|
40 |
| |
|
41 |
131757
| public Object childrenAccept(JavaParserVisitor visitor, Object data) {
|
|
42 |
131757
| if (children != null) {
|
|
43 |
103356
| for (int i = 0; i < children.length; ++i) {
|
|
44 |
128528
| ((JavaNode) children[i]).jjtAccept(visitor, data);
|
|
45 |
| } |
|
46 |
| } |
|
47 |
131757
| return data;
|
|
48 |
| } |
|
49 |
| |
|
50 |
| |
|
51 |
| |
|
52 |
| |
|
53 |
| |
|
54 |
| |
|
55 |
| |
|
56 |
| |
|
57 |
| |
|
58 |
| |
|
59 |
| |
|
60 |
8636
| public String toString() {
|
|
61 |
8636
| return JavaParserTreeConstants.jjtNodeName[id];
|
|
62 |
| } |
|
63 |
| } |