protected Method getXmlElementDeclMethod(Class<?> type) {
XmlType xmlType = type.getAnnotation(XmlType.class);
if (xmlType == null) {
return null;
}
Class<?> factoryClass = xmlType.factoryClass();
if (factoryClass == XmlType.DEFAULT.class) {
String defaultObjectFactoryName = type.getPackage().getName() + ".ObjectFactory";
try {
factoryClass = Thread.currentThread().getContextClassLoader().loadClass(defaultObjectFactoryName);
} catch (Exception e) {