-
public final class XC_MethodHook.MethodHookParam extends XCallback.Param
Wraps information about the method call and allows to influence it.
-
-
Constructor Summary
Constructors Constructor Description XC_MethodHook.MethodHookParam()
-
Method Summary
Modifier and Type Method Description ObjectgetResult()Returns the result of the method call. voidsetResult(Object result)Modify the result of the method call. ThrowablegetThrowable()Returns the Throwable thrown by the method, or {@code null}.voidsetThrowable(Throwable throwable)Modify the exception thrown of the method call. booleanhasThrowable()Returns true if an exception was thrown by the method. ObjectgetResultOrThrowable()Returns the result of the method call, or throws the Throwable caused by it. -
-
Method Detail
-
setResult
void setResult(Object result)
Modify the result of the method call.
If called from beforeHookedMethod, it prevents the call to the original method.
-
getThrowable
Throwable getThrowable()
Returns the Throwable thrown by the method, or
{@code null}.
-
setThrowable
void setThrowable(Throwable throwable)
Modify the exception thrown of the method call.
If called from beforeHookedMethod, it prevents the call to the original method.
-
hasThrowable
boolean hasThrowable()
Returns true if an exception was thrown by the method.
-
getResultOrThrowable
Object getResultOrThrowable()
Returns the result of the method call, or throws the Throwable caused by it.
-
-
-
-