@Test public void testInterceptorsTargetBeanInfo() { Assert.assertTrue(new SimpleInterceptorResolutionStrategy().resolveRegisteredInterceptors(beanFactory).get(0).getInterceptedBeans().size()==1); }
@Override public List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) throw new InterceptorAwareBeanFactoryPostProcessorException("Simple interceptor strategy only supports ConfigurableListableBeanFactory"); ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory; List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>(); if (registeredInterceptorsCache == null) { interceptors.addAll(collectInterceptors(configurableListableBeanFactory)); } else { interceptors = registeredInterceptorsCache; } return interceptors; }
SimpleInterceptorResolutionStrategy implements InterceptorResolutionStrategy { @Override public List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) throw new InterceptorAwareBeanFactoryPostProcessorException("Simple interceptor strategy only supports ConfigurableListableBeanFactory"); ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory; List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>(); if (registeredInterceptorsCache == null) { interceptors.addAll(collectInterceptors(configurableListableBeanFactory)); } else { interceptors = registeredInterceptorsCache; } return interceptors; } }
SimpleInterceptorResolutionStrategy implements InterceptorResolutionStrategy { @Override public List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) throw new InterceptorAwareBeanFactoryPostProcessorException("Simple interceptor strategy only supports ConfigurableListableBeanFactory"); ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory; List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>(); if (registeredInterceptorsCache == null) { interceptors.addAll(collectInterceptors(configurableListableBeanFactory)); } else { interceptors = registeredInterceptorsCache; } return interceptors; }  }
SimpleInterceptorResolutionStrategy implements InterceptorResolutionStrategy { @Override public List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) throw new InterceptorAwareBeanFactoryPostProcessorException("Simple interceptor strategy only supports ConfigurableListableBeanFactory"); ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory; List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>(); if (registeredInterceptorsCache == null) { interceptors.addAll(collectInterceptors(configurableListableBeanFactory)); } else { interceptors = registeredInterceptorsCache; } return interceptors; }  @Override List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory); InterceptorInfo resolveInterceptorTargets(BeanFactory beanFactory, InterceptorInfo interceptorInfo); }
SimpleInterceptorResolutionStrategy implements InterceptorResolutionStrategy { @Override public List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) throw new InterceptorAwareBeanFactoryPostProcessorException("Simple interceptor strategy only supports ConfigurableListableBeanFactory"); ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory; List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>(); if (registeredInterceptorsCache == null) { interceptors.addAll(collectInterceptors(configurableListableBeanFactory)); } else { interceptors = registeredInterceptorsCache; } return interceptors; }  @Override List<InterceptorInfo> resolveRegisteredInterceptors(BeanFactory beanFactory); InterceptorInfo resolveInterceptorTargets(BeanFactory beanFactory, InterceptorInfo interceptorInfo);  }