if (generateGenericType(type)) {
buildGenericElements(schema, seq, f);
} else {
JAXBBeanInfo beanInfo = getBeanInfo(type);
if (beanInfo != null) {
XmlElement xmlElementAnno = f.getAnnotation(XmlElement.class);
addElement(schema, seq, beanInfo, new QName(namespace, f.getName()), isArray(type), xmlElementAnno);
}
}
}
for (Method m : Utils.getGetters(cls, accessType)) {
//map method
Type type = Utils.getMethodReturnType(m);
// we want to return the right type for collections so if we get null
// from the return type we check if it's ParameterizedType and get the
// generic return type.
if ((type == null) && (m.getGenericReturnType() instanceof ParameterizedType)) {
type = m.getGenericReturnType();
}
if (generateGenericType(type)) {
buildGenericElements(schema, seq, m, type);
} else {
JAXBBeanInfo beanInfo = getBeanInfo(type);
if (beanInfo != null) {
int idx = m.getName().startsWith("get") ? 3 : 2;
String name = m.getName().substring(idx);
name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
XmlElement xmlElementAnno = m.getAnnotation(XmlElement.class);
addElement(schema, seq, beanInfo, new QName(namespace, name), isArray(type), xmlElementAnno);
}
}
}
// Create element in xsd:sequence for Exception.class