1
2
3 package net.sourceforge.pmd.ast;
4
5 public class ASTBooleanLiteral extends SimpleNode {
6 public ASTBooleanLiteral(int id) {
7 super(id);
8 }
9
10 public ASTBooleanLiteral(JavaParser p, int id) {
11 super(p, id);
12 }
13
14 private boolean isTrue;
15
16 public void setTrue() {
17 isTrue = true;
18 }
19
20 public boolean isTrue() {
21 return this.isTrue;
22 }
23
24
25 /*** Accept the visitor. **/
26 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
27 return visitor.visit(this, data);
28 }
29
30 public void dump(String prefix) {
31 String out = isTrue ? "true" : "false";
32 System.out.println(toString(prefix) + ":" + out);
33 dumpChildren(prefix);
34 }
35
36 }