How do we get field name if we have field as below.
@XmlElement(required = true)
protected String code;
If i try to get as:
Field f = clazz.getDeclaredField(field);
XmlElement xmlElement = f.getAnnotation(XmlElement.class);
xmlElement.name() // returns as ##default instead of code.