// annotation and
// doesn't appear in the other list, add it to the final list
List<Property> fieldProperties = getFieldPropertiesForClass(cls, info, false);
Map<String, Property> fields = new HashMap<String, Property>(fieldProperties.size());
for (Property next : fieldProperties) {
JavaHasAnnotations elem = next.getElement();
if (!hasJAXBAnnotations(elem)) {
next.setTransient(true);
}
list.add(next);
fields.put(next.getPropertyName(), next);
}
List<Property> methodProperties = getPropertyPropertiesForClass(cls, info, false);
for (Property next : methodProperties) {
JavaHasAnnotations elem = next.getElement();
if (hasJAXBAnnotations(elem)) {
// If the property is annotated remove the corresponding field
Property fieldProperty = fields.get(next.getPropertyName());
list.remove(fieldProperty);
list.add(next);