public class MethodInvoker extends Object
Method.invoke(Object, Object...)
method that allows for basic instrumentation.Constructor and Description |
---|
MethodInvoker(Method m,
MethodExecStats stats)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getDeclaringClass()
Convenience method for calling
|
String |
getName()
Convenience method for calling
|
Method |
inner()
Returns the inner method.
|
Object |
invoke(Object o,
Object... args)
Invokes the underlying method.
|
public MethodInvoker(Method m, MethodExecStats stats)
m
- The method being wrapped.stats
- The instrumentor.public Object invoke(Object o, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
o
- The object the underlying method is invoked from.args
- The arguments used for the method call.obj
with parameters args
IllegalAccessException
- Thrown from underlying method.IllegalArgumentException
- Thrown from underlying method.InvocationTargetException
- Thrown from underlying method.public Class<?> getDeclaringClass()
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.