Package com.aliucord.patcher
Object Patcher
-
- All Implemented Interfaces:
public class PatcherHelper for applying Xposed method hooks.
-
-
Method Summary
Modifier and Type Method Description final static XC_MethodHook.UnhookaddPatch(Member member, XC_MethodHook hook)Hook the given reflective member (method or constructor) with the provided hook. final static XC_MethodHook.UnhookaddPatch(Class<?> clazz, String methodName, Array<Class<?>> paramTypes, XC_MethodHook hook)Hook the method with the given name on the specified class. final static XC_MethodHook.UnhookaddPatch(Class<?> clazz, String methodName, XC_MethodHook hook)Hook the method with the given name on the specified class. final static XC_MethodHook.UnhookaddPatch(String forClass, String methodName, Array<Class<?>> paramTypes, XC_MethodHook hook)Load the class by name and hook the specified method. final static XC_MethodHook.UnhookaddPatch(String forClass, String methodName, XC_MethodHook hook)Load the class by name and hook the specified method. -
-
Method Detail
-
addPatch
final static XC_MethodHook.Unhook addPatch(Member member, XC_MethodHook hook)
Hook the given reflective member (method or constructor) with the provided hook.
- Parameters:
member- the method or constructor to hookhook- the XC_MethodHook to apply- Returns:
an Unhook that can remove the applied hook
-
addPatch
@JvmOverloads() final static XC_MethodHook.Unhook addPatch(Class<?> clazz, String methodName, Array<Class<?>> paramTypes, XC_MethodHook hook)
Hook the method with the given name on the specified class.
- Parameters:
clazz- the class containing the methodmethodName- the name of the method to hookparamTypes- the parameter types (defaults to none)hook- the XC_MethodHook to apply- Returns:
an Unhook that can remove the applied hook, or null on failure
-
addPatch
@JvmOverloads() final static XC_MethodHook.Unhook addPatch(Class<?> clazz, String methodName, XC_MethodHook hook)
Hook the method with the given name on the specified class.
- Parameters:
clazz- the class containing the methodmethodName- the name of the method to hookhook- the XC_MethodHook to apply- Returns:
an Unhook that can remove the applied hook, or null on failure
-
addPatch
@JvmOverloads() final static XC_MethodHook.Unhook addPatch(String forClass, String methodName, Array<Class<?>> paramTypes, XC_MethodHook hook)
Load the class by name and hook the specified method.
- Parameters:
forClass- the full name of the class to load (e.g.methodName- the name of the method to hookparamTypes- the parameter types (defaults to none)hook- the XC_MethodHook to apply- Returns:
an Unhook that can remove the applied hook, or null on failure
-
addPatch
@JvmOverloads() final static XC_MethodHook.Unhook addPatch(String forClass, String methodName, XC_MethodHook hook)
Load the class by name and hook the specified method.
- Parameters:
forClass- the full name of the class to load (e.g.methodName- the name of the method to hookhook- the XC_MethodHook to apply- Returns:
an Unhook that can remove the applied hook, or null on failure
-
-
-
-