Class InstrumentationProxyHelper
java.lang.Object
io.opentelemetry.javaagent.bootstrap.InstrumentationProxyHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
unwrapIfNeeded
(Object o, Class<T> type) Unwraps and casts an indy proxy, or just casts if it's not an indy proxy.
-
Method Details
-
unwrapIfNeeded
Unwraps and casts an indy proxy, or just casts if it's not an indy proxy.- Type Parameters:
T
- type of object to return- Parameters:
o
- object to unwraptype
- expected object type- Returns:
- unwrapped proxy instance or the original object (if not a proxy) cast to the expected type
- Throws:
IllegalArgumentException
- if the provided object the proxied object can't be cast to the expected type
-