gt:         List list = (List)this.propertyValue;
context: /*
   * Decompiled with CFR 0_114.
   * 
   * Could not load the following classes:
   *  com.stimulsoft.lib.commoninterface.IStiName
   *  com.stimulsoft.lib.utils.StiValidationUtil
   */
  package com.stimulsoft.base.serializing;
  
  import com.stimulsoft.base.design.IStiDefault;
  import com.stimulsoft.base.serializing.StiBranch;
  import com.stimulsoft.base.serializing.StiClassProperties;
  import com.stimulsoft.base.serializing.StiProperties;
  import com.stimulsoft.base.serializing.StiProperty;
  import com.stimulsoft.base.serializing.StiSerializerControler;
  import com.stimulsoft.base.serializing.interfaceobject.IStiSerializable;
  import com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef;
  import com.stimulsoft.base.serializing.interfaceobject.IStiSerializableToString;
  import com.stimulsoft.base.serializing.utils.StiClassConverter;
  import com.stimulsoft.base.serializing.utils.StiSerializTypeConverter;
  import com.stimulsoft.base.serializing.xmlelements.BaseElement;
  import com.stimulsoft.base.serializing.xmlelements.IsNullElement;
  import com.stimulsoft.base.serializing.xmlelements.ListElement;
  import com.stimulsoft.base.serializing.xmlelements.ReferenceElement;
  import com.stimulsoft.base.serializing.xmlelements.ReferenceToObjectElement;
  import com.stimulsoft.base.serializing.xmlelements.SimpleElement;
  import com.stimulsoft.base.system.StiCopyOnWriteArrayList;
  import com.stimulsoft.base.system.StiGuid;
  import com.stimulsoft.lib.commoninterface.IStiName;
  import com.stimulsoft.lib.utils.StiValidationUtil;
  import java.util.ArrayList;
  import java.util.Hashtable;
  import java.util.List;
  import org.w3c.dom.Element;
  import org.w3c.dom.Node;
  import org.w3c.dom.Text;
  
  /*
   * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
   */
  public class StiSerializerReport {
      private final IStiSerializable instance;
      private final StiProperties propertys;
      private final StiSerializerControler controler;
      private final StiBranch branch;
      private Hashtable<String, Object> memoryStore = new Hashtable();
      private StiProperty currentProperty;
      private Object propertyValue;
  
      StiSerializerReport(StiSerializerControler stiSerializerControler, StiBranch stiBranch, IStiSerializableRef iStiSerializableRef) {
          this(stiSerializerControler, stiBranch, (IStiSerializable)iStiSerializableRef);
      }
  
      public Hashtable<String, Object> getMemoryStore() {
          return this.memoryStore;
      }
  
      StiSerializerReport(StiSerializerControler stiSerializerControler, StiBranch stiBranch, IStiSerializable iStiSerializable) {
          this.branch = stiBranch;
          this.controler = stiSerializerControler;
          this.instance = iStiSerializable;
          this.propertys = StiClassProperties.getPropertys(iStiSerializable);
      }
  
      public void serialize(List<IStiSerializableRef> list) {
          for (StiProperty stiProperty : this.propertys.getProperties()) {
              if (!this.isSerializableProperty(stiProperty)) continue;
              this.serializProperty(stiProperty, list);
          }
      }
  
      protected boolean isSerializableProperty(StiProperty stiProperty) {
          return stiProperty.isSerializableToReport() && !stiProperty.isDeprecated();
      }
  
      private void serializProperty(StiProperty stiProperty, List<IStiSerializableRef> list) {
          this.currentProperty = stiProperty;
          this.propertyValue = this.currentProperty.getReturnValue(this.instance);
          if (this.currentProperty.memoryStore()) {
              String string = StiGuid.newGuid().toString();
              this.memoryStore.put(string, this.propertyValue);
              if (this.currentProperty.isCollection()) {
                  this.propertyValue = new ArrayList();
                  ((ArrayList)this.propertyValue).add(string);
              } else {
                  this.propertyValue = string;
              }
          }
          this.processOnDependingType(list);
      }
  
      protected StiProperty getCurrentProperty() {
          return this.currentProperty;
      }
  
      protected void processOnDependingType(List<IStiSerializableRef> list) {
          if (this.currentProperty.isObject()) {
              this.serializeObject(list);
          } else if (this.currentProperty.isCollection()) {
              this.serializeCollection(list);
          } else {
              this.serializePrimitive();
          }
      }
  
      private void serializeObject(List<IStiSerializableRef> list) {
          if (this.propertyValue == null) {
              return;
          }
          if (this.isDefaultObject()) {
              return;
          }
          if (this.isSerializableToString()) {
              this.serializableToString();
          } else if (this.isReferenceToObject()) {
              this.serializeReference();
          } else {
              this.serializeParent((IStiSerializableRef)this.propertyValue, this.branch, this.getPropertyName(), list);
          }
      }
  
      private boolean isSerializableToString() {
          return IStiSerializableToString.class.isAssignableFrom(this.propertyValue.getClass());
      }
  
      private boolean isReferenceToObject() {
          IStiSerializableRef iStiSerializableRef = (IStiSerializableRef)this.propertyValue;
          boolean bl = this.currentProperty.isReferenceToObject();
          boolean bl2 = iStiSerializableRef.getReference() > -1;
          return bl || bl2;
      }
  
      private boolean memoryStore() {
          return this.currentProperty.memoryStore();
      }
  
      protected void serializableToString() {
          IStiSerializableToString iStiSerializableToString = (IStiSerializableToString)this.propertyValue;
          String string = iStiSerializableToString.serialize();
          this.serializePrimitive(this.getPropertyName(), string);
      }
  
      private void serializeReference() {
          IStiSerializableRef iStiSerializableRef = (IStiSerializableRef)this.propertyValue;
          int n = iStiSerializableRef.getReference();
          BaseElement baseElement = this.isEmptyReference(n) ? this.serializeEmptyReference(iStiSerializableRef) : new ReferenceToObjectElement(this.controler, this.getPropertyName(), n);
          this.branch.appendChild(baseElement);
      }
  
      private BaseElement serializeEmptyReference(IStiSerializableRef iStiSerializableRef) {
          SimpleElement simpleElement = new SimpleElement(this.controler, this.getPropertyName());
          this.controler.addUndefinedRef(simpleElement, iStiSerializableRef);
          return simpleElement;
      }
  
      private boolean isEmptyReference(int n) {
          return n == -1;
      }
  
      private void serializeParent(IStiSerializableRef iStiSerializableRef, StiBranch stiBranch, String string, List<IStiSerializableRef> list) {
          try {
              this.controler.setNextReferenceForParent(iStiSerializableRef, list);
              String string2 = StiClassConverter.getNetClass(iStiSerializableRef.getClass());
              ReferenceElement referenceElement = new ReferenceElement(this.controler, string, string2, iStiSerializableRef.getReference());
              stiBranch.appendChild(referenceElement);
              this.controler.serializeBranch(referenceElement.createNewBranch(), iStiSerializableRef, list);
          }
          catch (Exception var5_6) {
              throw new RuntimeException(var5_6);
          }
      }
  
      private void serializeCollection(List<IStiSerializableRef> list) {
          if (this.currentProperty.isValueCollection()) {
              this.serializeValueCollection();
          } else if (this.currentProperty.isPrimitiveCollection()) {
              this.serializePrimitiveCollection();
          } else {
              this.serializeObjectCollection(list);
          }
      }
  
      private void serializeValueCollection() {
          StiBranch stiBranch = this.createListBranch();
          for (Object e : (List)this.propertyValue) {
              if (e == null) continue;
              String string = ((IStiSerializableToString)e).serialize();
              this.simpleSerialiseAsValue(stiBranch, string);
          }
      }
  
      private void simpleSerialiseAsValue(StiBranch stiBranch, String string) {
          this.simpleSerialise("value", string, stiBranch);
      }
  
      private void serializePrimitiveCollection() {
          StiBranch stiBranch = this.createListBranch();
          for (Object e : (List)this.propertyValue) {
              this.simpleSerialiseAsValue(stiBranch, e.toString());
          }
      }
  
      protected void serializeObjectCollection(List<IStiSerializableRef> list) {
          StiBranch stiBranch = this.createListBranch();
          for (Object e : (List)this.propertyValue) {
              if (e == null) continue;
              this.serializeParentInCollection(stiBranch, e, list);
          }
      }
  
      protected void serializeParentInCollection(StiBranch stiBranch, Object object, List<IStiSerializableRef> list) {
          IStiSerializableRef iStiSerializableRef = (IStiSerializableRef)object;
          this.serializeParent(iStiSerializableRef, stiBranch, this.getNamePropertyInCollection(iStiSerializableRef), list);
      }
  
      private void serializePrimitive() {
          this.serializePrimitive(this.getPropertyName(), this.propertyValue);
      }
  
      protected void serializePrimitive(String string, Object object) {
          if (this.isDefaulValue(object)) {
              return;
          }
          if (object == null) {
              IsNullElement isNullElement = new IsNullElement(this.controler, string);
              this.branch.appendChild(isNullElement);
              return;
          }
          String string2 = StiSerializTypeConverter.getDataByClass(object);
          this.simpleSerialise(string, string2, this.branch);
      }
  
      private void simpleSerialise(String string, String string2, StiBranch stiBranch) {
          Element element = this.controler.createElement(string);
          Text text = this.controler.createTextNode(string2);
          element.appendChild(text);
          stiBranch.appendChild(element);
      }
  
      protected String getPropertyName() {
          return this.currentProperty.getName();
      }
  
      protected StiSerializerControler getControler() {
          return this.controler;
      }
  
      protected Object getPropertyValue() {
          return this.propertyValue;
      }
  
      protected String getNamePropertyInCollection(IStiSerializableRef iStiSerializableRef) {
          if (iStiSerializableRef instanceof IStiName) {
              String string = ((IStiName)iStiSerializableRef).getName();
              if (StiValidationUtil.isEmpty((String)string)) {
                  throw new RuntimeException("did not specify the name of the element " + iStiSerializableRef);
              }
              return string;
          }
          return iStiSerializableRef.toString();
      }
  
      protected StiBranch createListBranch() {
          this.ifNullCreatEmptyProperty();
  