/** * Return the ordered list of interceptor info for a particular * callback event type. This list *does* include the info * on any bean class callback. If present, this would always be the * last element in the list because of the precedence defined by the spec. */ public List<InterceptorDescriptor> getCallbackInterceptors(LifecycleCallbackDescriptor.CallbackType type) { LinkedList<InterceptorDescriptor> callbackInterceptors = new LinkedList<InterceptorDescriptor>(); for (InterceptorDescriptor next : classInterceptorChain) { if (next.getCallbackDescriptors(type).size() > 0) { callbackInterceptors.add(next); } } if (this.hasCallbackDescriptor(type)) { InterceptorDescriptor beanClassCallbackInfo = new InterceptorDescriptor(); beanClassCallbackInfo.setFromBeanClass(true); beanClassCallbackInfo.addCallbackDescriptors(type, this.getCallbackDescriptors(type)); beanClassCallbackInfo.setInterceptorClassName(getBeanClassName()); callbackInterceptors.add(beanClassCallbackInfo); } return callbackInterceptors; }
/** * Return the ordered list of interceptor info for a particular * callback event type. This list *does* include the info * on any bean class callback. If present, this would always be the * last element in the list because of the precedence defined by the spec. */ public List<InterceptorDescriptor> getCallbackInterceptors(CallbackType type) { LinkedList<InterceptorDescriptor> callbackInterceptors = new LinkedList<InterceptorDescriptor>(); for (InterceptorDescriptor next : classInterceptorChain) { if (next.getCallbackDescriptors(type).size() > 0) { callbackInterceptors.add(next); } } if (this.hasCallbackDescriptor(type)) { InterceptorDescriptor beanClassCallbackInfo = new InterceptorDescriptor(); beanClassCallbackInfo.setFromBeanClass(true); beanClassCallbackInfo.addCallbackDescriptors(type, this.getCallbackDescriptors(type)); beanClassCallbackInfo.setInterceptorClassName(getBeanClassName()); callbackInterceptors.add(beanClassCallbackInfo); } return callbackInterceptors; }