JavaEEInterceptorBuilder interceptorBuilder = (JavaEEInterceptorBuilder)
desc.getInterceptorBuilder();
InterceptorInvoker interceptorInvoker =
interceptorBuilder.createInvoker(null);
// This is the object passed back to the caller.
callerObject = (T) interceptorInvoker.getProxy();
Object[] interceptorInstances = interceptorInvoker.getInterceptorInstances();
// Inject interceptor instances
for(int i = 0; i < interceptorInstances.length; i++) {
inject(interceptorInstances[i], desc);
}
interceptorInvoker.invokeAroundConstruct();
// This is the managed bean class instance
Object managedBean = interceptorInvoker.getTargetInstance();
inject(managedBean, desc);
interceptorInvoker.invokePostConstruct();
desc.addBeanInstanceInfo(managedBean, interceptorInvoker);
}