com.caucho.quercus.expr
Class LiteralExpr

java.lang.Object
  extended by com.caucho.quercus.expr.Expr
      extended by com.caucho.quercus.expr.LiteralExpr
Direct Known Subclasses:
LiteralExprPro

public class LiteralExpr
extends Expr

Represents a literal expression.


Field Summary
 
Fields inherited from class com.caucho.quercus.expr.Expr
COMPILE_ARG_MAX
 
Constructor Summary
LiteralExpr(Value value)
           
 
Method Summary
 Value eval(Env env)
          Evaluates the expression.
 Value evalConstant()
          Evaluates the expression as a constant.
protected  Value getValue()
           
 boolean isBoolean()
          Returns true if the expression evaluates to a boolean.
 boolean isDouble()
          Returns true for a double value.
 boolean isFalse()
          Returns true if a static true value.
 boolean isLiteral()
          Returns true for a literal expression.
 boolean isLong()
          Returns true for a long value.
 boolean isTrue()
          Returns true if a static true value.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.quercus.expr.Expr
assign, canRead, createAssign, createAssignFrom, createAssignRef, createCall, createClassConst, createClassField, createClassField, createCopy, createDeref, createFieldGet, createFieldGet, createIsset, createRef, createUnset, evalArg, evalArgs, evalArray, evalArrayAssign, evalAssignRef, evalAssignValue, evalBoolean, evalChar, evalConstantPrefix, evalConstantSuffix, evalCopy, evalDirty, evalDouble, evalIsset, evalLong, evalObject, evalPostIncrement, evalPreIncrement, evalRef, evalString, evalStringValue, evalTop, evalUnsetArray, evalValue, evalVar, getFileName, getFunctionLocation, getLine, getLocation, getLocationLine, isArray, isAssign, isConstant, isNumber, isRef, isString, isVar, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiteralExpr

public LiteralExpr(Value value)
Method Detail

getValue

protected Value getValue()

isLiteral

public boolean isLiteral()
Returns true for a literal expression.

Overrides:
isLiteral in class Expr

isTrue

public boolean isTrue()
Returns true if a static true value.

Overrides:
isTrue in class Expr

isFalse

public boolean isFalse()
Returns true if a static true value.

Overrides:
isFalse in class Expr

isLong

public boolean isLong()
Returns true for a long value.

Overrides:
isLong in class Expr

isDouble

public boolean isDouble()
Returns true for a double value.

Overrides:
isDouble in class Expr

isBoolean

public boolean isBoolean()
Description copied from class: Expr
Returns true if the expression evaluates to a boolean.

Overrides:
isBoolean in class Expr

evalConstant

public Value evalConstant()
Evaluates the expression as a constant.

Overrides:
evalConstant in class Expr
Returns:
the expression value.

eval

public Value eval(Env env)
Evaluates the expression.

Specified by:
eval in class Expr
Parameters:
env - the calling environment.
Returns:
the expression value.

toString

public java.lang.String toString()
Overrides:
toString in class Expr