//fields are accessible even if not public, must look at the declared fields
//then walk to parents declared fields, etc...
Field fields[] = ReflectionUtil.getDeclaredFields(cls);
for (Field f : fields) {
if (isFieldAccepted(f, accessType)) {
XmlJavaTypeAdapter xjta = Utils.getFieldXJTA(f);
if (xjta != null) {
Type t = Utils.getTypeFromXmlAdapter(xjta);
if (t != null) {
addType(t);
continue;
}
}
addType(f.getGenericType());
}
}
walkReferences(cls.getSuperclass());
}
if (accessType != XmlAccessType.FIELD) { // only look for methods if we are instructed to
Method methods[] = ReflectionUtil.getDeclaredMethods(cls);
for (Method m : methods) {
if (isMethodAccepted(m, accessType)) {
XmlJavaTypeAdapter xjta = Utils.getMethodXJTA(m);
if (xjta != null) {
Type t = Utils.getTypeFromXmlAdapter(xjta);
if (t != null) {
addType(t);
continue;