{
throw new AnnotationException("Annotation '" + annotationClass.getSimpleName() + "' requires a " +
"non-null value for array elements for attribute '" + annotationAttribute.getName() + "'");
}
SimpleTypeCaster caster = SimpleTypeCasterFactory.getCaster(arrayValue.getClass(), annotationAttribute.getType().getComponentType());
Object finalValue = caster.cast(arrayValue);
if (finalValue == null)
{
throw new AnnotationException("Annotation '" + annotationClass.getSimpleName() + "' requires a " +
annotationAttribute.getType().getComponentType().getSimpleName() + "-typed value for array elements for attribute '" + annotationAttribute.getName() + "' but received " +
"a " + arrayValue.getClass().getSimpleName() + "-typed value");