1 19 package org.apache.cayenne.exp.parser; 20 21 import java.io.PrintWriter ; 22 23 import org.apache.cayenne.exp.Expression; 24 25 37 public class ASTTrue extends ConditionNode { 38 39 42 ASTTrue(int id) { 43 super(id); 44 } 45 46 public ASTTrue() { 47 super(ExpressionParserTreeConstants.JJTTRUE); 48 } 49 50 protected Object evaluateNode(Object o) throws Exception { 51 return Boolean.TRUE; 52 } 53 54 protected String getExpressionOperator(int index) { 55 throw new UnsupportedOperationException ("No operator for '" 56 + ExpressionParserTreeConstants.jjtNodeName[id] 57 + "'"); 58 } 59 60 public Expression shallowCopy() { 61 return new ASTTrue(id); 62 } 63 64 public int getType() { 65 return Expression.TRUE; 66 } 67 68 public void encodeAsString(PrintWriter pw) { 69 pw.print("true"); 70 } 71 72 } 73 | Popular Tags |