private List<ParamResolver> findContextResolvers(XmlWebApplicationContext context) {
String[] resolverNames = SpringUtils.getBeanNames(context.getBeanFactory(),
ParamResolver.class);
ArrayList<ParamResolver> resolvers = new ArrayList<ParamResolver>(resolverNames.length);
for (String beanName : resolverNames) {
ParamResolver resolver = (ParamResolver) context.getBean(beanName);
Class<?> userClass = ClassUtils.getUserClass(resolver);
if (userClass.isAnnotationPresent(Ignored.class)) {
if (logger.isDebugEnabled()) {
logger.debug("Ignored context resolver:" + resolver);
}
continue;
}
if (userClass.isAnnotationPresent(NotForSubModules.class)
&& context.getBeanFactory().getBeanDefinition(beanName) == null) {
if (logger.isDebugEnabled()) {
logger.debug("Ignored context resolver (NotForSubModules):" + resolver);
}
continue;
}
resolvers.add(resolver);
if (logger.isDebugEnabled()) {
logger.debug("context resolver[" + resolver.getClass().getName());
}
}
return resolvers;
}