R
- return type of the classT
- the type/class of the object which contains the method that should be executedpublic class MethodInvokingTask<R,T> extends Object implements Task<R>
public MethodInvokingTask(T object, String methodName, Class<R> methodReturnType, Object... methodParams) throws NoSuchMethodException
object
- the object which contains the method with given namemethodName
- the name of the method which should be executedmethodReturnType
- class representing the return value of the method.methodParams
- the arguments which should be passed to the methodNoSuchMethodException
- if such method can not be foundCopyright © 2017. All rights reserved.