declaredType = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(element.getAdaptedJavaType().getQualifiedName(), helper.getClassLoader());
}else{
declaredType = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(pType.getQualifiedName(), helper.getClassLoader());
}
JAXBElementConverter converter = new JAXBElementConverter(xmlField, declaredType, scopeClass);
if (isCollection){
ChoiceCollectionMapping xmlChoiceCollectionMapping = (ChoiceCollectionMapping) mapping;
if(element.getJavaTypeAdapterClass() != null){
converter.setNestedConverter(new XMLJavaTypeConverter(element.getJavaTypeAdapterClass().getName()));
}else{
CoreConverter originalConverter = xmlChoiceCollectionMapping.getConverter(xmlField);
converter.setNestedConverter(originalConverter);
}
xmlChoiceCollectionMapping.addConverter(xmlField, converter);
} else {
ChoiceObjectMapping xmlChoiceObjectMapping = (ChoiceObjectMapping) mapping;
if(element.getJavaTypeAdapterClass() != null){
converter.setNestedConverter(new XMLJavaTypeConverter(element.getJavaTypeAdapterClass().getName()));
}else{
CoreConverter originalConverter = xmlChoiceObjectMapping.getConverter(xmlField);
converter.setNestedConverter(originalConverter);
}
xmlChoiceObjectMapping.addConverter(xmlField, converter);
}
}
}