use of com.creditease.monitor.proxy.spi.JDKProxyInvokeHandler in project uavstack by uavorg.
the class DynamicProxyInstaller method adapt.
@SuppressWarnings("rawtypes")
public static Object adapt(Object t) {
if (!Proxy.isProxyClass(t.getClass())) {
return t;
}
InvocationHandler ih = Proxy.getInvocationHandler(t);
if (ih == null) {
return t;
}
if (!JDKProxyInvokeHandler.class.isAssignableFrom(ih.getClass())) {
return t;
}
JDKProxyInvokeHandler jpih = (JDKProxyInvokeHandler) ih;
return jpih.getTarget();
}
Aggregations