return CollectionHelper.asSet(
new ConstraintCheckError( element, null, "CONSTRAINT_TYPE_MUST_DECLARE_GROUPS_MEMBER" )
);
}
DeclaredType type = getComponentTypeOfArrayReturnType( groupsMethod );
if ( type == null ) {
return CollectionHelper.asSet(
new ConstraintCheckError( groupsMethod, null, "RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
);
}
boolean typeHasNameClass = type.asElement().getSimpleName().contentEquals( "Class" );
boolean typeHasExactlyOneTypeArgument = type.getTypeArguments().size() == 1;
boolean typeArgumentIsUnboundWildcard = validateWildcardBounds( type.getTypeArguments().get( 0 ), null, null );
if ( !( typeHasNameClass && typeHasExactlyOneTypeArgument && typeArgumentIsUnboundWildcard ) ) {
return CollectionHelper.asSet(
new ConstraintCheckError( groupsMethod, null, "RETURN_TYPE_MUST_BE_CLASS_ARRAY" )
);