Constructor and Description |
---|
ClassTask(Method method,
boolean isStaticMethod,
ParameterFactory[] parameterFactories)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
Object |
doTask(TaskContext<ClassWork,Indexed,Indexed> context)
Does the task.
|
Method |
getMethod()
|
static Object |
invokeMethod(Object instance,
Method method,
Object[] parameters)
|
static Object |
invokeMethod(Object instance,
Method method,
Object[] parameters,
Map<Class<?>,Method> cache)
|
public ClassTask(Method method, boolean isStaticMethod, ParameterFactory[] parameterFactories)
method
- Method to invoke for this Task
.isStaticMethod
- Indicates if the Method
is static
.parameterFactories
- ParameterFactory
instances.public static Object invokeMethod(Object instance, Method method, Object[] parameters, Map<Class<?>,Method> cache) throws Throwable
Invokes the Method
as the Task
on a type.
As the Object could be of any child of the type, the Method
may
need to be derived from the input instance.
Before the input instance is interrogated the Method
is attempted
to be retrieved from the cache
. Should the Method
not be in the cache
it is derived and loaded into the
cache
.
public static Object invokeMethod(Object instance, Method method, Object[] parameters) throws Throwable
Copyright © 2005–2016. All rights reserved.