if(null != mapping) {
if(mapping.isCollectionMapping()) {
if(mapping.getContainerPolicy().isListPolicy()) {
if(stringTokenizer.hasMoreElements()) {
Object childObject = ((ListContainerPolicy) mapping.getContainerPolicy()).get(xPathFragment.getIndexValue() - 1, mapping.getAttributeValueFromObject(object), null);
ObjectBuilder childObjectBuilder = mapping.getReferenceDescriptor().getObjectBuilder();
setValueByXPath(childObject, childObjectBuilder, stringTokenizer, namespaceResolver, value);
return;
} else {
List list = (List) mapping.getAttributeValueFromObject(object);
list.add(xPathFragment.getIndexValue() - 1, value);
return;
}
}
}
}
}
} else {
if(stringTokenizer.hasMoreElements()) {
Object childObject = mapping.getAttributeValueFromObject(object);
ObjectBuilder childObjectBuilder = mapping.getReferenceDescriptor().getObjectBuilder();
setValueByXPath(childObject, childObjectBuilder, stringTokenizer, namespaceResolver, value);
return;
} else {
mapping.setAttributeValueInObject(object, value);
return;