boolean found = false;
for (Annotation annotation : annotations)
{
Class<? extends Annotation> annotationType = annotation.annotationType();
BeanSourceReaderClass beanSourceReaderClass = annotationType.getAnnotation(BeanSourceReaderClass.class);
if (beanSourceReaderClass != null)
{
if (found == true)
{
throw new ApplicationConfigurationException(
"Action bean class "
+ actionClass.getName()
+ " has more than one bean source annotation, that is, annotations which themselves use the annotation "
+ BeanSourceReaderClass.class.getName());
}
BeanSourceReader beanSourceReader = ReflectHelper.createInstance(beanSourceReaderClass.value(),
BeanSourceReader.class);
beanSource = beanSourceReader.readBeanSource(actionClass, annotation);
found = true;
}