Class MethodExecutionStrategy
- java.lang.Object
-
- ch.obermuhlner.scriptengine.java.execution.MethodExecutionStrategy
-
- All Implemented Interfaces:
ExecutionStrategy
public class MethodExecutionStrategy extends java.lang.Object implements ExecutionStrategy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MethodExecutionStrategybyArgumentTypes(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>[] argumentTypes, java.lang.Object... arguments)static MethodExecutionStrategybyMatchingArguments(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Object... arguments)static MethodExecutionStrategybyMethod(java.lang.reflect.Method method, java.lang.Object... arguments)java.lang.Objectexecute(java.lang.Object instance)
-
-
-
Method Detail
-
execute
public java.lang.Object execute(java.lang.Object instance) throws javax.script.ScriptException- Specified by:
executein interfaceExecutionStrategy- Throws:
javax.script.ScriptException
-
byMethod
public static MethodExecutionStrategy byMethod(java.lang.reflect.Method method, java.lang.Object... arguments)
-
byArgumentTypes
public static MethodExecutionStrategy byArgumentTypes(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>[] argumentTypes, java.lang.Object... arguments) throws javax.script.ScriptException
- Throws:
javax.script.ScriptException
-
byMatchingArguments
public static MethodExecutionStrategy byMatchingArguments(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Object... arguments) throws javax.script.ScriptException
- Throws:
javax.script.ScriptException
-
-