FileDocCategorySizeDatePackage
MethodExpressionLiteral.javaAPI DocApache Tomcat 6.0.143141Fri Jul 20 04:20:32 BST 2007org.apache.el

MethodExpressionLiteral

public class MethodExpressionLiteral extends MethodExpression implements Externalizable

Fields Summary
private Class
expectedType
private String
expr
private Class[]
paramTypes
Constructors Summary
public MethodExpressionLiteral()

        // do nothing
    
public MethodExpressionLiteral(String expr, Class expectedType, Class[] paramTypes)

        this.expr = expr;
        this.expectedType = expectedType;
        this.paramTypes = paramTypes;
    
Methods Summary
public booleanequals(java.lang.Object obj)

        return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode());
    
public java.lang.StringgetExpressionString()

        return this.expr;
    
public javax.el.MethodInfogetMethodInfo(javax.el.ELContext context)

        return new MethodInfo(this.expr, this.expectedType, this.paramTypes);
    
public inthashCode()

        return this.expr.hashCode();
    
public java.lang.Objectinvoke(javax.el.ELContext context, java.lang.Object[] params)

        if (this.expectedType != null) {
            return ELSupport.coerceToType(this.expr, this.expectedType);
        } else {
            return this.expr;
        }
    
public booleanisLiteralText()

        return true;
    
public voidreadExternal(java.io.ObjectInput in)

        this.expr = in.readUTF();
        String type = in.readUTF();
        if (!"".equals(type)) {
            this.expectedType = ReflectionUtil.forName(type);
        }
        this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
                .readObject()));
    
public voidwriteExternal(java.io.ObjectOutput out)

        out.writeUTF(this.expr);
        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
                : "");
        out.writeObject(ReflectionUtil.toTypeNameArray(this.paramTypes));