newTargetBeanInstance.setInterceptorsHandler(methodHandler);
ProxyFactory.setBeanInstance(beanManager.getContextId(), proxy, newTargetBeanInstance, bean);
return proxy;
} catch (PrivilegedActionException e) {
if (e.getCause() instanceof InstantiationException) {
throw new WeldException(BeanLogger.LOG.proxyInstantiationFailed(this), e.getCause());
} else if (e.getCause() instanceof IllegalAccessException) {
throw new WeldException(BeanLogger.LOG.proxyInstantiationBeanAccessFailed(this), e.getCause());
} else {
throw new WeldException(e.getCause());
}
}
}