for (Field field : fields) {
if (field.isAnnotationPresent(Property.class)) {
String property = field.getName();
Property r = field.getAnnotation(Property.class);
boolean annotationRedefinesName =!r.name().isEmpty()
&& r.deprecatedMessage().isEmpty();
if (annotationRedefinesName) {
property = r.name();
}
if(property == null || property.isEmpty()) {
throw new IllegalArgumentException("Cannot create empty attribute name for element xs:attribute, field is " + field);