Class<? extends IBase> type = theValue.getClass(); String childName = theChild.getChildNameByDatatype(type); BaseRuntimeElementDefinition<?> childDef = theChild.getChildElementDefinitionByDatatype(type); if (childDef == null) { if (elementDef.getName().equals("code")) { Class<? extends IBase> type2 = myContext.getElementDefinition("code").getImplementingClass(); childDef = theChild.getChildElementDefinitionByDatatype(type2); childName = theChild.getChildNameByDatatype(type2); BaseRuntimeElementDefinition<?> def = myContext.getElementDefinition((Class<? extends IBase>) nextSuperType); Class<?> nextChildType = def.getImplementingClass(); childDef = theChild.getChildElementDefinitionByDatatype((Class<? extends IBase>) nextChildType); childName = theChild.getChildNameByDatatype((Class<? extends IBase>) nextChildType);
childElementDef = nextChild.getChildElementDefinitionByDatatype(nextValue.getClass());
childElementDef = nextChild.getChildElementDefinitionByDatatype(nextValue.getClass());
encodeChildElementToStreamWriter(theResource, theEventWriter, null, nextChild.getChildNameByDatatype(null), nextChild.getChildElementDefinitionByDatatype(null), null, theContainedResource, theSubResource, nextChildElem); } else {
Class<? extends IBase> type = theValue.getClass(); String childName = theChild.getChildNameByDatatype(type); BaseRuntimeElementDefinition<?> childDef = theChild.getChildElementDefinitionByDatatype(type); if (childDef == null) { if (elementDef.getName().equals("code")) { Class<? extends IBase> type2 = myContext.getElementDefinition("code").getImplementingClass(); childDef = theChild.getChildElementDefinitionByDatatype(type2); childName = theChild.getChildNameByDatatype(type2); BaseRuntimeElementDefinition<?> def = myContext.getElementDefinition((Class<? extends IBase>) nextSuperType); Class<?> nextChildType = def.getImplementingClass(); childDef = theChild.getChildElementDefinitionByDatatype((Class<? extends IBase>) nextChildType); childName = theChild.getChildNameByDatatype((Class<? extends IBase>) nextChildType);
childElementDef = nextChild.getChildElementDefinitionByDatatype(nextValue.getClass());
childElementDef = nextChild.getChildElementDefinitionByDatatype(nextValue.getClass());
encodeChildElementToStreamWriter(theResource, theEventWriter, null, nextChild.getChildNameByDatatype(null), nextChild.getChildElementDefinitionByDatatype(null), null, theContainedResource, nextChildElem, theEncodeContext); } else {