public static final class XC_MethodHook.MethodHookParam<T extends java.lang.reflect.Executable> extends XCallback.Param
| Modifier and Type | Field and Description |
|---|---|
java.lang.Object[] |
args
Arguments to the method call.
|
java.lang.reflect.Member |
method
The hooked method/constructor.
|
boolean |
returnEarly |
java.lang.Object |
thisObject
The
this reference for an instance method, or null for static methods. |
callbacks| Constructor and Description |
|---|
MethodHookParam() |
| Modifier and Type | Method and Description |
|---|---|
<U> U |
getArg(int index) |
java.lang.Object[] |
getArgs() |
<U> U |
getExtra(java.lang.String key) |
T |
getOrigin() |
java.lang.Object |
getResult()
Returns the result of the method call.
|
java.lang.Object |
getResultOrThrowable()
Returns the result of the method call, or throws the Throwable caused by it.
|
java.lang.Object |
getThis() |
java.lang.Throwable |
getThrowable()
Returns the
Throwable thrown by the method, or null. |
boolean |
hasThrowable()
Returns true if an exception was thrown by the method.
|
java.lang.Object |
invokeOrigin() |
boolean |
isSkipped() |
void |
returnAndSkip(java.lang.Object returnValue) |
<U> void |
setArg(int index,
U value) |
<U> void |
setExtra(java.lang.String key,
U value) |
void |
setResult(java.lang.Object result)
Modify the result of the method call.
|
void |
setThrowable(java.lang.Throwable throwable)
Modify the exception thrown of the method call.
|
void |
throwAndSkip(java.lang.Throwable throwable) |
getExtra, getObjectExtra, setObjectExtrapublic java.lang.reflect.Member method
public java.lang.Object thisObject
this reference for an instance method, or null for static methods.public java.lang.Object[] args
public boolean returnEarly
public java.lang.Object getResult()
public void setResult(java.lang.Object result)
If called from XC_MethodHook.beforeHookedMethod(de.robv.android.xposed.XC_MethodHook.MethodHookParam<?>), it prevents the call to the original method.
public java.lang.Throwable getThrowable()
Throwable thrown by the method, or null.public boolean isSkipped()
public boolean hasThrowable()
public void setThrowable(java.lang.Throwable throwable)
If called from XC_MethodHook.beforeHookedMethod(de.robv.android.xposed.XC_MethodHook.MethodHookParam<?>), it prevents the call to the original method.
public java.lang.Object getResultOrThrowable()
throws java.lang.Throwable
java.lang.Throwablepublic T getOrigin()
public java.lang.Object getThis()
public java.lang.Object[] getArgs()
public <U> U getArg(int index)
public <U> void setArg(int index,
U value)
public void returnAndSkip(java.lang.Object returnValue)
public void throwAndSkip(java.lang.Throwable throwable)
public java.lang.Object invokeOrigin()
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionpublic <U> U getExtra(java.lang.String key)
public <U> void setExtra(java.lang.String key,
U value)
throws java.util.ConcurrentModificationException
java.util.ConcurrentModificationException