1 9 10 package org.nfunk.jep; 11 12 15 public class ASTConstant extends SimpleNode { 16 private Object value; 17 18 public ASTConstant(int id) { 19 super(id); 20 } 21 22 public ASTConstant(Parser p, int id) { 23 super(p, id); 24 } 25 26 public void setValue(Object val) { 27 value = val; 28 } 29 30 public Object getValue() { 31 return value; 32 } 33 34 35 public Object jjtAccept(ParserVisitor visitor, Object data) throws ParseException 36 { 37 return visitor.visit(this, data); 38 } 39 40 public String toString() { 41 return "Constant: " + value; 42 } 43 } 44 | Popular Tags |