}
List containerValues = treeObjectBuilder.getContainerValues();
if (null != containerValues) {
containersMap = new HashMap(containerValues.size());
for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
ContainerValue containerValue = (ContainerValue)containerValues.get(x);
Object containerInstance = null;
if(containerValue.getReuseContainer()) {
containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
}
if(null == containerInstance) {
containerInstance = containerValue.getContainerInstance();
}
containersMap.put(containerValue, containerInstance);
if(containerValue.getMapping() instanceof XMLChoiceCollectionMapping) {
XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue = (XMLChoiceCollectionMappingUnmarshalNodeValue)containerValue;
for(NodeValue next:nodeValue.getAllNodeValues()) {
NodeValue nestedNodeValue = ((XMLChoiceCollectionMappingUnmarshalNodeValue)next).getChoiceElementNodeValue();
containersMap.put((ContainerValue)nestedNodeValue, containerInstance);
}