if(!xmlDescriptor.hasInheritance() || xmlDescriptor.getInheritancePolicy().getClassIndicatorField() == null){
initialize((TreeObjectBuilder)xmlDescriptor.getObjectBuilder());
initializeRecord((XMLMapping)null);
return;
}
InheritancePolicy inheritancePolicy = xmlDescriptor.getInheritancePolicy();
Class classValue = inheritancePolicy.classFromRow(this, session);
if (classValue == null) {
// no xsi:type attribute - look for type indicator on the default root element
QName leafElementType = xmlDescriptor.getDefaultRootElementType();
// if we have a user-set type, try to get the class from the inheritance policy
if (leafElementType != null) {
XPathQName xpathQName = new XPathQName(leafElementType, isNamespaceAware());
Object indicator = inheritancePolicy.getClassIndicatorMapping().get(xpathQName);
if(indicator != null) {
classValue = (Class)indicator;
}
}
}