/**
* Hooks all methods with a certain name that were declared in the specified class. Inherited
* methods and constructors are not considered. For constructors, use
* {@link #hookAllConstructors} instead.
*
* @param hookClass The class to check for declared methods.
* @param methodName The name of the method(s) to hook.
* @param callback The callback to be executed when the hooked methods are called.
* @return A set containing one object for each found method which can be used to unhook it.
*/
@SuppressWarnings("all")
public static HashSet<XC_MethodHook.Unhook> hookAllMethods(final Class<?> hookClass,
final String methodName,
final XC_MethodHook callback) {
final HashSet<XC_MethodHook.Unhook> unhooks = new HashSet<>();
for (final Member method : hookClass.getDeclaredMethods())
if (method.getName().equals(methodName))
unhooks.add(hookMethod(method, callback));
return unhooks;
}
XposedBridge.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:AndHook
作者:
评论列表
文章目录