try {
Class staticClass = dynamicClassLoader.getParent().loadClass(Helper.getQualifiedJavaTypeName(type.getName(), pkgName));
oxmJavaClasses.add(new JavaClassImpl(staticClass, null));
} catch(Exception ex) {
type.setName(Helper.getQualifiedJavaTypeName(type.getName(), pkgName));
oxmJavaClasses.add(new OXMJavaClassImpl(type));
}
}
}
if (b.getXmlRegistries() != null) {
List<XmlRegistry> registries = b.getXmlRegistries().getXmlRegistry();
for (Iterator<XmlRegistry> iterator = registries.iterator(); iterator.hasNext();) {
XmlRegistry reg = iterator.next();
oxmJavaClasses.add(new OXMObjectFactoryImpl(reg));
}
}
if (b.getXmlEnums() != null) {
List<XmlEnum> enums = b.getXmlEnums().getXmlEnum();
for (Iterator<XmlEnum> iterator = enums.iterator(); iterator.hasNext();) {
XmlEnum xmlEnum = iterator.next();
List<XmlEnumValue> enumValues = xmlEnum.getXmlEnumValue();
List<String> enumValueStrings = new ArrayList<String>();
for (Iterator<XmlEnumValue> iterator2 = enumValues.iterator(); iterator2.hasNext();) {
XmlEnumValue xmlEnumValue = iterator2.next();
enumValueStrings.add(xmlEnumValue.getJavaEnumValue());
}
oxmJavaClasses.add(new OXMJavaClassImpl(xmlEnum.getJavaEnum(), enumValueStrings));
// Trigger a dynamic class generation, because we won't
// be creating a descriptor for this
dynamicClassLoader.addEnum(xmlEnum.getJavaEnum(), enumValueStrings.toArray());
}