org.springframework.expression.spel.support
Class ReflectiveMethodExecutor

java.lang.Object
  extended by org.springframework.expression.spel.support.ReflectiveMethodExecutor
All Implemented Interfaces:
MethodExecutor

 class ReflectiveMethodExecutor
extends java.lang.Object
implements MethodExecutor

Since:
3.0
Author:
Andy Clement, Juergen Hoeller

Field Summary
private  int[] argsRequiringConversion
           
private  java.lang.reflect.Method method
           
private  java.lang.Integer varargsPosition
           
 
Constructor Summary
ReflectiveMethodExecutor(java.lang.reflect.Method theMethod, int[] argumentsRequiringConversion)
           
 
Method Summary
 TypedValue execute(EvaluationContext context, java.lang.Object target, java.lang.Object... arguments)
          Execute a command using the specified arguments, and using the specified expression state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

private final java.lang.reflect.Method method

varargsPosition

private final java.lang.Integer varargsPosition

argsRequiringConversion

private final int[] argsRequiringConversion
Constructor Detail

ReflectiveMethodExecutor

public ReflectiveMethodExecutor(java.lang.reflect.Method theMethod,
                                int[] argumentsRequiringConversion)
Method Detail

execute

public TypedValue execute(EvaluationContext context,
                          java.lang.Object target,
                          java.lang.Object... arguments)
                   throws AccessException
Description copied from interface: MethodExecutor
Execute a command using the specified arguments, and using the specified expression state.

Specified by:
execute in interface MethodExecutor
Parameters:
context - the evaluation context in which the command is being executed
target - the target object of the call - null for static methods
arguments - the arguments to the executor, should match (in terms of number and type) whatever the command will need to run
Returns:
the value returned from execution
Throws:
AccessException - if there is a problem executing the command or the MethodExecutor is no longer valid