diff --git a/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java b/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java index 19566c1..fe97753 100644 --- a/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java +++ b/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java @@ -34,6 +34,7 @@ @SuppressWarnings("unchecked") public class BlackReflection { public static boolean DEBUG = false; + public static boolean CACHE = false; private static final Map, Object> sProxyCache = new HashMap<>(); // key caller @@ -180,6 +181,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } private static T getProxy(Class clazz, final Object caller, boolean withException) { + if (!CACHE) { + return null; + } try { if (!withException) { if (caller == null) {