de.uka.ipd.sdq.ByCounter.execution
Class MethodInvocationHelper
java.lang.Object
de.uka.ipd.sdq.ByCounter.execution.MethodInvocationHelper
public final class MethodInvocationHelper
- extends java.lang.Object
A set of tools that help with the invocation of methods at runtime.
Allows to check for matching parameters and the calling itself.
- Since:
- 0.1
- Version:
- 1.2
- Author:
- Martin Krogmann, Michael Kuperberg
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodInvocationHelper
public MethodInvocationHelper()
callMethods
public static InvocationResultData callMethods(java.util.logging.Logger log,
java.lang.Class<? extends java.lang.Object> clazz,
java.lang.Object parentObject,
java.util.List<MethodDescriptor> methodsToCall,
java.util.List<RuntimeMethodParameters> params)
- Call the specified methods using reflection.
- Parameters:
log
- A log where information on the progress is written to.clazz
- The class that contains the methods to execute.parentObject
- Class that contains the methods to call.methodsToCall
- List of method names to call.params
- Parameters for the method calls. This means one instance of RuntimeMethodParameters for each method. If null, no parameters is assumed.
- Returns:
- Result and duration of execution.
callMethodsNoArgs
public static InvocationResultData callMethodsNoArgs(java.util.logging.Logger log,
java.lang.Class<? extends java.lang.Object> clazz,
java.lang.Object parentObject,
java.util.List<MethodDescriptor> methodsToCall)
- Call the specfied methods that take no arguments using reflection.
Short for calling callMethods with params == null.
- Parameters:
log
- A log where information on the progress is written to.clazz
- The class that contains the methods to execute.parentObject
- Class that contains the methods to call.methodsToCall
- List of method names to call. Must not have arguments.
- Returns:
- Result and duration of execution.