}
private Set<ConstraintCheckError> checkAnnotationValue(TypeElement element, AnnotationMirror annotation) {
Set<ConstraintCheckError> errors = CollectionHelper.newHashSet();
AnnotationValue value = annotationApiHelper.getAnnotationValue( annotation, "value" );
TypeMirror valueType = (TypeMirror) value.getValue();
TypeElement valueElement = (TypeElement) typeUtils.asElement( valueType );
if ( valueElement.getKind().isInterface() || valueElement.getModifiers().contains( Modifier.ABSTRACT ) ) {
errors.add(
new ConstraintCheckError(
element,
annotation,
"GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_MUST_BE_AN_IMPLEMENTATION_CLASS"
)
);
}
else {
//the TypeElement hosting the annotation is a concrete implementation of the DefaultGroupSequenceProvider
//interface. In that case, we need to check that it has a public default constructor.
if ( !hasPublicDefaultConstructor( valueElement ) ) {
errors.add(
new ConstraintCheckError(
element,
annotation,
"GROUP_SEQUENCE_PROVIDER_ANNOTATION_VALUE_CLASS_MUST_HAVE_DEFAULT_CONSTRUCTOR",
valueType
)
);
}
}
TypeMirror genericProviderType = retrieveGenericProviderType( valueType );
if ( !typeUtils.isSubtype( element.asType(), genericProviderType ) ) {
errors.add(
new ConstraintCheckError(
element,
annotation,