// Skip validating factory beans which are created by another
// factory bean
if (factoryBd.getFactoryBeanName() == null) {
if (factoryBd.isAbstract() || factoryBd.getBeanClassName() == null) {
context.error(bean, "INVALID_FACTORY_BEAN", "Referenced factory bean '" + beanName
+ "' is invalid (abstract or no bean class)", new ValidationProblemAttribute("BEAN",
beanName));
}
else {
// Validate non-static factory method in factory bean
// Factory beans with factory methods can only be
// validated during runtime - so skip them
if (factoryBd.getFactoryMethodName() == null) {
validateFactoryMethod(bean, factoryBd.getBeanClassName(), methodName,
(bean.getConstructorArguments().size() > 0 ? bean.getConstructorArguments().size()
: -1), Static.NO, context, typeEngine);
}
}
}
}
catch (NoSuchBeanDefinitionException e) {
// Skip error "parent name is equal to bean name"
if (!e.getBeanName().equals(bean.getElementName())) {
context.error(bean, "UNDEFINED_FACTORY_BEAN", "Factory bean '" + beanName + "' not found",
new ValidationProblemAttribute("BEAN", beanName));
}
}
}
}