com.caucho.el
Class BooleanLiteral

java.lang.Object
  extended by javax.el.Expression
      extended by javax.el.ValueExpression
          extended by com.caucho.el.Expr
              extended by com.caucho.el.AbstractBooleanExpr
                  extended by com.caucho.el.BooleanLiteral
All Implemented Interfaces:
java.io.Serializable

public class BooleanLiteral
extends AbstractBooleanExpr

A boolean literal expression.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.el.Expr
L, log
 
Constructor Summary
BooleanLiteral(boolean value)
          Creates a new boolean literal.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true for equal strings.
 boolean evalBoolean(ELContext env)
          Evaluate the expression as an boolean
 boolean isConstant()
          Returns true if the expression is constant.
 void printCreate(WriteStream os)
          Prints the Java code to recreate the BooleanLiteral.
 java.lang.String toString()
          Returns a readable representation of the expr.
 
Methods inherited from class com.caucho.el.AbstractBooleanExpr
evalDouble, evalLong, evalString, getValue, print
 
Methods inherited from class com.caucho.el.Expr
coerceToType, createField, createField, createMethod, error, evalBigDecimal, evalBigInteger, evalCharacter, evalObject, evalPeriod, evalStringWithNull, getExpectedType, getExpressionString, getMethodInfo, getType, hashCode, invocationError, invoke, isDouble, isDoubleString, isLiteralText, isReadOnly, print, printEscaped, printEscapedString, setProperty, setValue, toBigDecimal, toBigInteger, toBoolean, toCharacter, toDouble, toEnum, toLong, toStream, toStream, toStream, toStreamEscaped, toStreamEscaped, toStreamEscaped, toString, toString, toString, toString, toString, toStringWithNull
 
Methods inherited from class javax.el.ValueExpression
getValueReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanLiteral

public BooleanLiteral(boolean value)
Creates a new boolean literal.

Parameters:
value - the value
Method Detail

isConstant

public boolean isConstant()
Returns true if the expression is constant.

Overrides:
isConstant in class Expr

evalBoolean

public boolean evalBoolean(ELContext env)
                    throws ELException
Evaluate the expression as an boolean

Specified by:
evalBoolean in class AbstractBooleanExpr
Parameters:
env - the variable environment
Returns:
the value as a boolean
Throws:
ELException

printCreate

public void printCreate(WriteStream os)
                 throws java.io.IOException
Prints the Java code to recreate the BooleanLiteral.

Overrides:
printCreate in class Expr
Parameters:
os - the output stream to the *.java code.
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Returns true for equal strings.

Overrides:
equals in class Expr

toString

public java.lang.String toString()
Returns a readable representation of the expr.

Specified by:
toString in class Expr