}
}
}
}
//we must use the same context over the life of the instance
SimpleInterceptorFactoryContext interceptorContext = new SimpleInterceptorFactoryContext();
Object objectInstance = createObjectInstance();
List<Interceptor> preDestoryInterceptors = new ArrayList<Interceptor>();
createPreDestroyMethods(interceptorContext, preDestoryInterceptors);
//apply injections, and add the clean up interceptors to the pre destroy chain
//we want interceptors that clean up injections to be last in the interceptor chain
//so the injections are not cleaned up until all @AroundInvoke methods have been run
preDestoryInterceptors.addAll(applyInjections(objectInstance));
AbstractComponentInstance instance = constructComponentInstance(objectInstance, preDestoryInterceptors, interceptorContext);
performPostConstructLifecycle(instance, interceptorContext);
// process the interceptors bound to individual methods
// the interceptors are tied to the lifecycle of the instance
final Map<Method, InterceptorFactory> factoryMap = getInterceptorFactoryMap();
final Map<Method, Interceptor> methodMap = new IdentityHashMap<Method, Interceptor>(factoryMap.size());
interceptorContext.getContextData().put(AbstractComponent.INSTANCE_KEY, objectInstance);
for (Map.Entry<Method, InterceptorFactory> entry : factoryMap.entrySet()) {
Method method = entry.getKey();
PerViewMethodInterceptorFactory.populate(interceptorContext, this, instance, method);
InterceptorFactory interceptorFactory = entry.getValue();
assert interceptorFactory != null : "Can't find interceptor factory for " + method;