return properties;
}
for (Iterator<JavaField> fieldIt = cls.getDeclaredFields().iterator(); fieldIt.hasNext();) {
Property property = null;
JavaField nextField = fieldIt.next();
int modifiers = nextField.getModifiers();
if (!Modifier.isTransient(modifiers) && ((Modifier.isPublic(nextField.getModifiers()) && onlyPublic) || !onlyPublic)) {
if (!Modifier.isStatic(modifiers)) {
if ((onlyExplicit && hasJAXBAnnotations(nextField)) || !onlyExplicit) {
property = buildNewProperty(info, cls, nextField, nextField.getName(), nextField.getResolvedType());
properties.add(property);
}
} else if (helper.isAnnotationPresent(nextField, XmlAttribute.class)) {
try {
property = buildNewProperty(info, cls, nextField, nextField.getName(), nextField.getResolvedType());
Object value = ((JavaFieldImpl) nextField).get(null);
if (value != null) {
String stringValue = (String) XMLConversionManager.getDefaultXMLManager().convertObject(value, String.class, property.getSchemaType());
property.setFixedValue(stringValue);
} else {
property.setWriteOnly(true);
}
properties.add(property);
} catch (ClassCastException e) {
// do Nothing
} catch (IllegalAccessException e) {
// do Nothing
}
}
}
if (helper.isAnnotationPresent(nextField, XmlTransient.class)) {
if(property != null){
property.setTransient(true);
}
// If a property is marked transient ensure it doesn't exist in
// the propOrder
List<String> propOrderList = Arrays.asList(info.getPropOrder());
if (propOrderList.contains(nextField.getName())) {
throw JAXBException.transientInProporder(nextField.getName());
}
}
}
return properties;
}