Package com.aliucord.patcher
Class PatcherExtensionsKt
-
- All Implemented Interfaces:
public final class PatcherExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> Runnable
instead(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Object> callback)
Replaces a constructor of a class. final static <T extends Any> Runnable
instead(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Object> callback)
Replaces a method of a class. final static <T extends Any> Runnable
before(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a PreHook to a constructor of a class. final static <T extends Any> Runnable
before(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a PreHook to a method of a class. final static <T extends Any> Runnable
after(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a Hook to a constructor of a class. final static <T extends Any> Runnable
after(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a Hook to a method of a class. -
-
Method Detail
-
instead
final static <T extends Any> Runnable instead(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Object> callback)
Replaces a constructor of a class.
- Parameters:
paramTypes
- parameters of the method.callback
- callback for the patch
-
instead
final static <T extends Any> Runnable instead(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Object> callback)
Replaces a method of a class.
- Parameters:
methodName
- name of the method to patchparamTypes
- parameters of the method.callback
- callback for the patch
-
before
final static <T extends Any> Runnable before(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a PreHook to a constructor of a class.
- Parameters:
paramTypes
- parameters of the constructor.callback
- callback for the patch
-
before
final static <T extends Any> Runnable before(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a PreHook to a method of a class.
- Parameters:
methodName
- name of the method to patchparamTypes
- parameters of the method.callback
- callback for the patch
-
after
final static <T extends Any> Runnable after(PatcherAPI $self, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a Hook to a constructor of a class.
- Parameters:
paramTypes
- parameters of the constructor.callback
- callback for the patch
-
after
final static <T extends Any> Runnable after(PatcherAPI $self, String methodName, Class<?> paramTypes, Function2<T, XC_MethodHook.MethodHookParam, Unit> callback)
Adds a Hook to a method of a class.
- Parameters:
methodName
- name of the method to patchparamTypes
- parameters of the method.callback
- callback for the patch
-
-
-
-