| java.lang.Object | ||
| ↳ | de.robv.android.xposed.callbacks.XCallback | |
| ↳ | de.robv.android.xposed.XC_MethodHook | |
Known Direct Subclasses
|
Callback class for method hooks.
Usually, anonymous subclasses of this class are created which override
beforeHookedMethod(XC_MethodHook.MethodHookParam) and/or afterHookedMethod(XC_MethodHook.MethodHookParam).
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| XC_MethodHook.MethodHookParam | Wraps information about the method call and allows to influence it. | ||||||||||
| XC_MethodHook.Unhook | An object with which the method/constructor can be unhooked. | ||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
de.robv.android.xposed.callbacks.XCallback
| |||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
de.robv.android.xposed.callbacks.XCallback
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new callback with default priority.
| |||||||||||
Creates a new callback with a specific priority.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Called after the invocation of the method.
| |||||||||||
Called before the invocation of the method.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
| |||||||||||
Creates a new callback with default priority.
Creates a new callback with a specific priority.
Note that afterHookedMethod(XC_MethodHook.MethodHookParam) will be called in reversed order, i.e.
the callback with the highest priority will be called last. This way, the callback has the
final control over the return value. beforeHookedMethod(XC_MethodHook.MethodHookParam) is called as usual, i.e.
highest priority first.
| priority | See XCallback.priority.
|
|---|
Called after the invocation of the method.
You can use XC_MethodHook.MethodHookParam.setResult(Object) and XC_MethodHook.MethodHookParam.setThrowable(Throwable)
to modify the return value of the original method.
Note that implementations shouldn't call super(param), it's not necessary.
| param | Information about the method call. |
|---|
| Throwable | Everything the callback throws is caught and logged. |
|---|
Called before the invocation of the method.
You can use XC_MethodHook.MethodHookParam.setResult(Object) and XC_MethodHook.MethodHookParam.setThrowable(Throwable)
to prevent the original method from being called.
Note that implementations shouldn't call super(param), it's not necessary.
| param | Information about the method call. |
|---|
| Throwable | Everything the callback throws is caught and logged. |
|---|