public interface MethodInvoker extends Invoker, Result<Invoker,java.lang.Object>
Method
.
For invoking a static method, you don't need to specify that instance:
MyType result = Reflection.invoke(Method)
.withoutArgs();
For a non-static method, you must specify an instance:
MyType result = Reflection.invoke(Method)
.on(instance).withArgs(arg1, arg2);
Modifier and Type | Method and Description |
---|---|
Invoker |
in(java.lang.Object instance)
Indicates the instance that the method must be invoked.
|
withArgs, withoutArgs
Invoker in(java.lang.Object instance)