Object[] args = null;
Object value;
try {
value = m.invoke(object, args);
if(value != null) {
ExportAsAttribute annotation = m.getAnnotation(ExportAsAttribute.class);
if(value instanceof Boolean && ((Boolean) value).booleanValue() == annotation.defaultBool()) {
return;
}
String attrName = annotation.name();
if(attrName.trim().length()==0) throw new IllegalArgumentException("value for annotation 'ExportAsAttribute' must not be empty!");
writer.addAttribute(attrName.trim(), value.toString());
}
}
catch (IllegalArgumentException e) {