mirror of
https://github.com/EsotericSoftware/reflectasm.git
synced 2025-01-06 01:40:22 +08:00
Added invoke(Object, Class[], Object...) method
Added a new invoke method that ensures the proper method invocation in the accessed instance, in case of overloadings.
This commit is contained in:
parent
af9620b361
commit
a84f49f26a
@ -20,6 +20,11 @@ public abstract class MethodAccess {
|
|||||||
|
|
||||||
abstract public Object invoke (Object object, int methodIndex, Object... args);
|
abstract public Object invoke (Object object, int methodIndex, Object... args);
|
||||||
|
|
||||||
|
/** Invokes the method with the specified name and the specified param types. */
|
||||||
|
public Object invoke (Object object, String methodName, Class[] paramTypes, Object... args) {
|
||||||
|
return invoke(object, getIndex(methodName, paramTypes), args);
|
||||||
|
}
|
||||||
|
|
||||||
/** Invokes the first method with the specified name and the specified number of arguments. */
|
/** Invokes the first method with the specified name and the specified number of arguments. */
|
||||||
public Object invoke (Object object, String methodName, Object... args) {
|
public Object invoke (Object object, String methodName, Object... args) {
|
||||||
return invoke(object, getIndex(methodName, args.length), args);
|
return invoke(object, getIndex(methodName, args.length), args);
|
||||||
|
Loading…
Reference in New Issue
Block a user