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 ASTFalse extends ConditionNode { 38 39 42 ASTFalse(int id) { 43 super(id); 44 } 45 46 public ASTFalse() { 47 super(ExpressionParserTreeConstants.JJTFALSE); 48 } 49 50 protected Object evaluateNode(Object o) throws Exception { 51 return Boolean.FALSE; 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 ASTFalse(id); 62 } 63 64 public int getType() { 65 return Expression.FALSE; 66 } 67 68 public void encodeAsString(PrintWriter pw) { 69 pw.print("false"); 70 } 71 72 } 73 | Popular Tags |