Commit 8dc5d1bf authored by swift_gan's avatar swift_gan

add global ref

parent 729a53fa
......@@ -8,9 +8,12 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class HookWrapper {
Map<Member,HookEntity> hookEntityMap = new ConcurrentHashMap<>();
public static void addHookClass(Class<?>... classes) throws HookErrorException {
for (Class clazz:classes) {
addHookClass(clazz);
......@@ -25,6 +28,7 @@ public class HookWrapper {
for (HookEntity entity:hookEntityMap.values()) {
if (entity.target != null && entity.hook != null) {
SandHook.hook(entity.target, entity.hook, entity.backup);
hookEntityMap.put(entity.target, entity);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment