Search in sources :

Example 1 with ProxyCtl

use of org.glassfish.hk2.api.ProxyCtl in project Payara by payara.

the class ConfigSupport method revealProxy.

/**
 * Unwrap HK2 proxy to ConfigBeanProxy.
 * @param ConfigBeanProxy probably proxied by HK2.
 * @return actual ConfigBeanProxy.
 * @throws MultiException If there was an error resolving the proxy.
 */
@SuppressWarnings("unchecked")
public static <T extends ConfigBeanProxy> T revealProxy(T proxy) {
    if (proxy instanceof ProxyCtl) {
        ProxyCtl proxyCtl = (ProxyCtl) proxy;
        proxy = (T) proxyCtl.__make();
    }
    return proxy;
}
Also used : ProxyCtl(org.glassfish.hk2.api.ProxyCtl)

Aggregations

ProxyCtl (org.glassfish.hk2.api.ProxyCtl)1