org.apache.commons.el
Class FunctionInvocation

java.lang.Object
  extended by org.apache.commons.el.Expression
      extended by org.apache.commons.el.FunctionInvocation
Direct Known Subclasses:
BoundFunctionInvocation

public class FunctionInvocation
extends Expression

Represents a function call.

Author:
Shawn Bayern (in the style of Nathan's other classes)

Constructor Summary
FunctionInvocation(String functionName, List argumentList)
          Constructor
 
Method Summary
 Expression bindFunctions(javax.servlet.jsp.el.FunctionMapper functions)
          Returns an expression with all FunctionInvocations replaced by BoundFunctionInvocations.
 Object evaluate(javax.servlet.jsp.el.VariableResolver pResolver, javax.servlet.jsp.el.FunctionMapper functions)
          Evaluates by looking up the name in the VariableResolver
 List getArgumentList()
           
 String getExpressionString()
          Returns the expression in the expression language syntax
 String getFunctionName()
           
protected  Method resolveFunction(javax.servlet.jsp.el.FunctionMapper functions)
          Returns the Method which is mapped to the function name used by this FunctionInvocation.
 void setArgumentList(List l)
           
 void setFunctionName(String f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionInvocation

public FunctionInvocation(String functionName,
                          List argumentList)
Constructor

Method Detail

getFunctionName

public String getFunctionName()

setFunctionName

public void setFunctionName(String f)

getArgumentList

public List getArgumentList()

setArgumentList

public void setArgumentList(List l)

getExpressionString

public String getExpressionString()
Returns the expression in the expression language syntax

Specified by:
getExpressionString in class Expression

evaluate

public Object evaluate(javax.servlet.jsp.el.VariableResolver pResolver,
                       javax.servlet.jsp.el.FunctionMapper functions)
                throws javax.servlet.jsp.el.ELException
Evaluates by looking up the name in the VariableResolver

Specified by:
evaluate in class Expression
Throws:
javax.servlet.jsp.el.ELException

resolveFunction

protected Method resolveFunction(javax.servlet.jsp.el.FunctionMapper functions)
                          throws javax.servlet.jsp.el.ELException
Returns the Method which is mapped to the function name used by this FunctionInvocation.

Parameters:
functions - The function mappings in use for this evaluation
Returns:
the Method to execute
Throws:
javax.servlet.jsp.el.ELException

bindFunctions

public Expression bindFunctions(javax.servlet.jsp.el.FunctionMapper functions)
                         throws javax.servlet.jsp.el.ELException
Description copied from class: Expression
Returns an expression with all FunctionInvocations replaced by BoundFunctionInvocations.

Specified by:
bindFunctions in class Expression
Parameters:
functions - the functions to use in this transformation
Returns:
an Expression identical to this expression except with all FunctionInvocations replaced by BoundFunctionInvocations.
Throws:
javax.servlet.jsp.el.ELException - if any of the functions in this Expression are not present in functions


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.