01: package javaparser;
02:
03: public final class EnumConstantNode extends ParserTreeNode {
04: public String name;
05:
06: public EnumConstantNode(RAWParserTreeNode enumConstNode) {
07: super ("enum const");
08: name = "" + enumConstNode.childs.get(1);
09:
10: this .setStartPosFrom(CCTreeUtils
11: .getFirstSubchild(enumConstNode));
12: this .setEndPosFrom(CCTreeUtils.getLastSubchild(enumConstNode));
13: }
14:
15: @Override
16: public String toString() {
17: return name;
18: }
19:
20: /** Call this to help GC !
21: */
22: @Override
23: public void terminate() {
24: super.terminate();
25:
26: name = null;
27: }
28: }
|