T
- the type of class members this dynamic method represents. It is
either Method
or Constructor
.public abstract class DynamicMethod<T extends java.lang.reflect.Member>
extends java.lang.Object
Constructor and Description |
---|
DynamicMethod() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
call(java.lang.Object target,
CallProtocol callProtocol,
java.lang.Object... args)
Invokes the dynamic method.
|
public abstract java.lang.Object call(java.lang.Object target, CallProtocol callProtocol, java.lang.Object... args)
target
- the target object -- the "this" of the invoked method, or
null for static methods.callProtocol
- the call protocol object used to convert arguments
if neededargs
- the arguments to the method. Note that you never need to
pack varargs into an array, nor need to be aware of the vararg concept
at all when using this API. If the called Java method ends up being a
vararg method, its varargs will be packed into an appropriate array
automatically.