com.caucho.el
Class MethodExpr

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

public class MethodExpr
extends Expr

Represents a named method call on an object.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.el.Expr
L, log
 
Constructor Summary
MethodExpr(Expr expr, java.lang.String methodName, Expr[] args)
          Creates a new method expression.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true for equal strings.
 java.lang.Object getValue(ELContext env)
          Evaluate the expression as an object.
 java.lang.Object invoke(ELContext env, java.lang.Class<?>[] argTypes, java.lang.Object[] args)
          Evaluates the expression, returning an object.
 void printCreate(WriteStream os)
          Prints the code to create an LongLiteral.
 java.lang.String toString()
          Returns the printed version.
 
Methods inherited from class com.caucho.el.Expr
coerceToType, createField, createField, createMethod, error, evalBigDecimal, evalBigInteger, evalBoolean, evalCharacter, evalDouble, evalLong, evalObject, evalPeriod, evalString, evalStringWithNull, getExpectedType, getExpressionString, getMethodInfo, getType, hashCode, invocationError, isConstant, isDouble, isDoubleString, isLiteralText, isReadOnly, print, 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

MethodExpr

public MethodExpr(Expr expr,
                  java.lang.String methodName,
                  Expr[] args)
Creates a new method expression.

Parameters:
expr - the expression generating the object on which the method is to be called
methodName - the name of the method to call
args - the arguments for the method
Method Detail

getValue

public java.lang.Object getValue(ELContext env)
                          throws ELException
Evaluate the expression as an object.

Specified by:
getValue 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
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

printCreate

public void printCreate(WriteStream os)
                 throws java.io.IOException
Prints the code to create an LongLiteral.

Overrides:
printCreate in class Expr
Parameters:
os - the stream to the *.java page
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 the printed version.

Specified by:
toString in class Expr