-
public interface XposedInterface.BeforeHookCallback
Contextual interface for before invocation callbacks.
-
-
Method Summary
Modifier and Type Method Description abstract Member
getMember()
Gets the method / constructor to be hooked. abstract Object
getThisObject()
Gets the {@code this}
object, or{@code null}
if the method is static.abstract Array<Object>
getArgs()
Gets the arguments passed to the method / constructor. abstract void
returnAndSkip(@Nullable() Object result)
Sets the return value of the method and skip the invocation. abstract void
throwAndSkip(@Nullable() Throwable throwable)
Throw an exception from the method / constructor and skip the invocation.Note that the after invocation callback will still be called. -
-
Method Detail
-
getThisObject
@Nullable() abstract Object getThisObject()
Gets the
{@code this}
object, or{@code null}
if the method is static.
-
getArgs
@NonNull() abstract Array<Object> getArgs()
Gets the arguments passed to the method / constructor. You can modify the arguments.
-
returnAndSkip
abstract void returnAndSkip(@Nullable() Object result)
Sets the return value of the method and skip the invocation. If the procedure is a constructor,the
{@code result}
param will be ignored.Note that the after invocation callback will still be called.- Parameters:
result
- The return value
-
throwAndSkip
abstract void throwAndSkip(@Nullable() Throwable throwable)
Throw an exception from the method / constructor and skip the invocation.Note that the after invocation callback will still be called.
- Parameters:
throwable
- The exception to be thrown
-
-
-
-