com.caucho.config.el
Class CandiExpr

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

public class CandiExpr
extends Expr

Variable resolution for webbeans variables

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.el.Expr
L, log
 
Constructor Summary
CandiExpr(Expr expr)
           
 
Method Summary
 Expr createField(Expr field)
          Creates a field reference using this expression as the base object.
 Expr createField(java.lang.String field)
          Creates a field reference using this expression as the base object.
 Expr createMethod(Expr[] args)
          Creates a method call using this as the obj.method expression
 java.math.BigDecimal evalBigDecimal(ELContext env)
          Evaluate the expression, knowing the value should be a BigDecimal.
 java.math.BigInteger evalBigInteger(ELContext env)
          Evaluate the expression, knowing the value should be a BigInteger.
 boolean evalBoolean(ELContext env)
          Evaluate the expression, knowing the value should be a boolean.
 char evalCharacter(ELContext env)
          Evaluate the expression, knowing the value should be a string
 double evalDouble(ELContext env)
          Evaluate the expression, knowing the value should be a double.
 long evalLong(ELContext env)
          Evaluate the expression, knowing the value should be a long
 long evalPeriod(ELContext env)
          Evaluate the expression, knowing the value should be a period
 java.lang.String evalString(ELContext env)
          Evaluate the expression, knowing the value should be a string
 java.lang.String evalStringWithNull(ELContext env)
          Evaluate the expression, knowing the value should be a string
 java.lang.Class<?> getExpectedType()
           
 java.lang.String getExpressionString()
           
 MethodInfo getMethodInfo(ELContext env, java.lang.Class<?> returnType, java.lang.Class<?>[] argTypes)
          Evaluates the expression, returning an object.
 java.lang.Class<?> getType(ELContext context)
           
 java.lang.Object getValue(ELContext env)
          Evaluates the expression, returning an object.
 java.lang.Object invoke(ELContext env, java.lang.Class<?>[] argTypes, java.lang.Object[] args)
          Evaluates the expression, returning an object.
 boolean isConstant()
          Returns true if the expression is constant.
 boolean isLiteralText()
          Returns true if the expression is literal text
 boolean isReadOnly(ELContext env)
          Returns true if the expression is read-only.
 boolean print(JspWriter out, ELContext env, boolean escapeXml)
          Evaluates directly to the output.
 boolean print(WriteStream out, ELContext env, boolean escapeXml)
          Evaluates directly to the output.
 void printCreate(WriteStream os)
          Generates the code to regenerate the expression.
 void setValue(ELContext env, java.lang.Object value)
          Evaluates the expression, setting an object.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.el.Expr
coerceToType, equals, error, evalObject, hashCode, invocationError, isDouble, isDoubleString, printEscaped, printEscapedString, setProperty, 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

CandiExpr

public CandiExpr(Expr expr)
Method Detail

isConstant

public boolean isConstant()
Description copied from class: Expr
Returns true if the expression is constant.

Overrides:
isConstant in class Expr

isReadOnly

public boolean isReadOnly(ELContext env)
Description copied from class: Expr
Returns true if the expression is read-only.

Overrides:
isReadOnly in class Expr

isLiteralText

public boolean isLiteralText()
Description copied from class: Expr
Returns true if the expression is literal text

Overrides:
isLiteralText in class Expr

createField

public Expr createField(Expr field)
Description copied from class: Expr
Creates a field reference using this expression as the base object.

Overrides:
createField in class Expr
Parameters:
field - the expression for the field.

createField

public Expr createField(java.lang.String field)
Description copied from class: Expr
Creates a field reference using this expression as the base object.

Overrides:
createField in class Expr
Parameters:
field - the string reference for the field.

createMethod

public Expr createMethod(Expr[] args)
Description copied from class: Expr
Creates a method call using this as the obj.method expression

Overrides:
createMethod in class Expr
Parameters:
args - the arguments for the method

getValue

public java.lang.Object getValue(ELContext env)
                          throws ELException
Description copied from class: Expr
Evaluates the expression, returning an object.

Specified by:
getValue in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

getMethodInfo

public MethodInfo getMethodInfo(ELContext env,
                                java.lang.Class<?> returnType,
                                java.lang.Class<?>[] argTypes)
                         throws ELException
Description copied from class: Expr
Evaluates the expression, returning an object.

Overrides:
getMethodInfo in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

invoke

public java.lang.Object invoke(ELContext env,
                               java.lang.Class<?>[] argTypes,
                               java.lang.Object[] args)
                        throws ELException
Description copied from class: Expr
Evaluates the expression, returning an object.

Overrides:
invoke in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

evalBoolean

public boolean evalBoolean(ELContext env)
                    throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a boolean.

Overrides:
evalBoolean in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a boolean
Throws:
ELException

evalDouble

public double evalDouble(ELContext env)
                  throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a double.

Overrides:
evalDouble in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a double
Throws:
ELException

evalLong

public long evalLong(ELContext env)
              throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a long

Overrides:
evalLong in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a double
Throws:
ELException

evalString

public java.lang.String evalString(ELContext env)
                            throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a string

Overrides:
evalString in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a string
Throws:
ELException

evalStringWithNull

public java.lang.String evalStringWithNull(ELContext env)
                                    throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a string

Overrides:
evalStringWithNull in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a string
Throws:
ELException

evalCharacter

public char evalCharacter(ELContext env)
                   throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a string

Overrides:
evalCharacter in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a string
Throws:
ELException

evalPeriod

public long evalPeriod(ELContext env)
                throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a period

Overrides:
evalPeriod in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a period
Throws:
ELException

evalBigInteger

public java.math.BigInteger evalBigInteger(ELContext env)
                                    throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a BigInteger.

Overrides:
evalBigInteger in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a BigInteger
Throws:
ELException

evalBigDecimal

public java.math.BigDecimal evalBigDecimal(ELContext env)
                                    throws ELException
Description copied from class: Expr
Evaluate the expression, knowing the value should be a BigDecimal.

Overrides:
evalBigDecimal in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a BigDecimal
Throws:
ELException

setValue

public void setValue(ELContext env,
                     java.lang.Object value)
              throws PropertyNotFoundException,
                     PropertyNotWritableException,
                     ELException
Description copied from class: Expr
Evaluates the expression, setting an object.

Overrides:
setValue in class Expr
Parameters:
env - the variable environment
Throws:
PropertyNotFoundException
PropertyNotWritableException
ELException

print

public boolean print(WriteStream out,
                     ELContext env,
                     boolean escapeXml)
              throws java.io.IOException,
                     ELException
Description copied from class: Expr
Evaluates directly to the output. The method returns true if the default value should be printed instead.

Overrides:
print in class Expr
Parameters:
out - the output writer
env - the variable environment
escapeXml - if true, escape reserved XML
Returns:
true if the object is null, otherwise false
Throws:
java.io.IOException
ELException

print

public boolean print(JspWriter out,
                     ELContext env,
                     boolean escapeXml)
              throws java.io.IOException,
                     ELException
Description copied from class: Expr
Evaluates directly to the output. The method returns true if the default value should be printed instead.

Overrides:
print in class Expr
Parameters:
out - the output writer
env - the variable environment
escapeXml - if true, escape reserved XML
Returns:
true if the object is null, otherwise false
Throws:
java.io.IOException
ELException

printCreate

public void printCreate(WriteStream os)
                 throws java.io.IOException
Description copied from class: Expr
Generates the code to regenerate the expression.

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

getExpressionString

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

getExpectedType

public java.lang.Class<?> getExpectedType()
Overrides:
getExpectedType in class Expr

getType

public java.lang.Class<?> getType(ELContext context)
                           throws PropertyNotFoundException,
                                  ELException
Overrides:
getType in class Expr
Throws:
PropertyNotFoundException
ELException

toString

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