@SuppressWarnings("unchecked") private static <P, T> P proxy(T target, Class<P> proxy) { return (P) Proxy.newProxyInstance(proxy.getClassLoader(), new Class[] { CompatProxy.class, proxy }, new ReflectiveInvoker(target)); }
public static Object unwrap(Object object) { if (object instanceof CompatProxy) { return ((ReflectiveInvoker) Proxy.getInvocationHandler(object)).target(); } return object; } }
public static Object unwrap(Object object) { if (object instanceof CompatProxy) { return ((ReflectiveInvoker) Proxy.getInvocationHandler(object)).target(); } return object; } }
@SuppressWarnings("unchecked") private static <P, T> P proxy(T target, Class<P> proxy) { return (P) Proxy.newProxyInstance(proxy.getClassLoader(), new Class[] { CompatProxy.class, proxy }, new ReflectiveInvoker(target)); }
public static Object unwrap(Object object) { if (object instanceof CompatProxy) { return ((ReflectiveInvoker) Proxy.getInvocationHandler(object)).target(); } return object; } }
@SuppressWarnings("unchecked") private static <P, T> P proxy(T target, Class<P> proxy) { return (P) Proxy.newProxyInstance(proxy.getClassLoader(), new Class[] { CompatProxy.class, proxy }, new ReflectiveInvoker(target)); }
public static Object unwrap(Object object) { if (object instanceof CompatProxy) { return ((ReflectiveInvoker) Proxy.getInvocationHandler(object)).target(); } return object; } }
@SuppressWarnings("unchecked") private static <P, T> P proxy(T target, Class<P> proxy) { return (P) Proxy.newProxyInstance(proxy.getClassLoader(), new Class[] { CompatProxy.class, proxy }, new ReflectiveInvoker(target)); }
public static Object unwrap(Object object) { if (object instanceof CompatProxy) { return ((ReflectiveInvoker) Proxy.getInvocationHandler(object)).target(); } return object; } }
@SuppressWarnings("unchecked") private static <P, T> P proxy(T target, Class<P> proxy) { return (P) Proxy.newProxyInstance(proxy.getClassLoader(), new Class[] { CompatProxy.class, proxy }, new ReflectiveInvoker(target)); }