docs: @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
      private List<InterfaceInfo> iterativeCreation(XsdAbstractElement element, String className, int interfaceIndex, String apiName, String groupName){
          List<XsdChoice> choiceElements = new ArrayList<>();
          List<XsdGroup> groupElements = new ArrayList<>();
          List<XsdAll> allElements = new ArrayList<>();
          List<XsdSequence> sequenceElements = new ArrayList<>();
          List<XsdElement> directElements = new ArrayList<>();
  
          Map<Class, List> mapper = new HashMap<>();
  
          mapper.put(XsdGroup.class, groupElements);
          mapper.put(XsdChoice.class, choiceElements);
          mapper.put(XsdAll.class, allElements);
          mapper.put(XsdSequence.class, sequenceElements);
          mapper.put(XsdElement.class, directElements);
  
          //noinspection unchecked
          element.getXsdElements()
                  .forEach(elementChild ->
                          mapper.get(elementChild.getClass()).add(elementChild)
                  );
  
          List<InterfaceInfo> interfaceInfoList = new ArrayList<>();
  
          if (element instanceof XsdGroup){
              XsdChoice choiceElement = choiceElements.size() == 1 ? choiceElements.get(0) : null;
              XsdSequence sequenceElement = sequenceElements.size() == 1 ? sequenceElements.get(0) : null;
              XsdAll allElement = allElements.size() == 1 ? allElements.get(0) : null;
  
              interfaceInfoList.add(groupMethod(((XsdGroup) element).getName(), choiceElement, allElement, sequenceElement, className, interfaceIndex, apiName));
          }
  
          if (element instanceof XsdAll){
              interfaceInfoList.add(allMethod(directElements, className, interfaceIndex, apiName, groupName));
          }
  
          if (element instanceof XsdChoice){
              interfaceInfoList = choiceMethod(groupElements, directElements, className, interfaceIndex, apiName, groupName);
          }
  
          if (element instanceof  XsdSequence){
              sequenceMethod(element.getXsdElements(), className, interfaceIndex, apiName, groupName);
          }
  
          interfaceInfoList.forEach(interfaceInfo -> createdInterfaces.put(interfaceInfo.getInterfaceName(), interfaceInfo));
  
          return interfaceInfoList;
      }