Package com.aliucord.patcher
Class InsteadHook
-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class InsteadHook extends XC_MethodHook
-
-
Field Summary
Fields Modifier and Type Field Description public final static InsteadHook
DO_NOTHING
private final Function1<XC_MethodHook.MethodHookParam, Object>
callback
public final Integer
priority
-
Constructor Summary
Constructors Constructor Description InsteadHook(Function1<XC_MethodHook.MethodHookParam, Object> callback)
-
Method Summary
Modifier and Type Method Description final Function1<XC_MethodHook.MethodHookParam, Object>
getCallback()
The callback to run instead of the method final static InsteadHook
returnConstant(Object constant)
InsteadHook that always returns the specified constant -
-
Constructor Detail
-
InsteadHook
InsteadHook(Function1<XC_MethodHook.MethodHookParam, Object> callback)
-
-
Method Detail
-
getCallback
final Function1<XC_MethodHook.MethodHookParam, Object> getCallback()
The callback to run instead of the method
-
returnConstant
final static InsteadHook returnConstant(Object constant)
InsteadHook that always returns the specified constant
- Parameters:
constant
- Constant to return
-
-
-
-