mapping = new XMLChoiceCollectionMapping();
initializeXMLContainerMapping((XMLChoiceCollectionMapping) mapping);
JavaClass collectionType = property.getType();
collectionType = containerClassImpl(collectionType);
((XMLChoiceCollectionMapping) mapping).useCollectionClassName(collectionType.getRawName());
JAXBElementRootConverter jaxbERConverter = new JAXBElementRootConverter(Object.class);
if (property.isSetXmlJavaTypeAdapter()) {
JavaClass adapterClass = helper.getJavaClass(property.getXmlJavaTypeAdapter().getValue());
jaxbERConverter.setNestedConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));
}
((XMLChoiceCollectionMapping) mapping).setConverter(jaxbERConverter);
if (property.isSetWriteOnly()) {
((XMLChoiceCollectionMapping) mapping).setIsWriteOnly(property.isWriteOnly());
}
if (property.isSetXmlElementWrapper()) {
((XMLChoiceCollectionMapping) mapping).setWrapperNullPolicy(getWrapperNullPolicyFromProperty(property));
}
} else {
mapping = new XMLChoiceObjectMapping();
JAXBElementRootConverter jaxbERConverter = new JAXBElementRootConverter(Object.class);
if (property.isSetXmlJavaTypeAdapter()) {
JavaClass adapterClass = helper.getJavaClass(property.getXmlJavaTypeAdapter().getValue());
jaxbERConverter.setNestedConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));
}
((XMLChoiceObjectMapping) mapping).setConverter(jaxbERConverter);
if (property.isSetWriteOnly()) {
((XMLChoiceObjectMapping) mapping).setIsWriteOnly(property.isWriteOnly());
}