public static List<XmlTag> getCustomSubTags(
      final DomInvocationHandler handler, final XmlTag[] subTags, final XmlFile file) {
    if (subTags.length == 0) {
      return Collections.emptyList();
    }

    final DomGenericInfoEx info = handler.getGenericInfo();
    final Set<XmlName> usedNames = new THashSet<XmlName>();
    List<? extends DomCollectionChildDescription> collectionChildrenDescriptions =
        info.getCollectionChildrenDescriptions();
    //noinspection ForLoopReplaceableByForEach
    for (int i = 0, size = collectionChildrenDescriptions.size(); i < size; i++) {
      DomCollectionChildDescription description = collectionChildrenDescriptions.get(i);
      usedNames.add(description.getXmlName());
    }
    List<? extends DomFixedChildDescription> fixedChildrenDescriptions =
        info.getFixedChildrenDescriptions();
    //noinspection ForLoopReplaceableByForEach
    for (int i = 0, size = fixedChildrenDescriptions.size(); i < size; i++) {
      DomFixedChildDescription description = fixedChildrenDescriptions.get(i);
      usedNames.add(description.getXmlName());
    }
    return ContainerUtil.findAll(
        subTags,
        tag -> {
          if (StringUtil.isEmpty(tag.getName())) return false;

          for (final XmlName name : usedNames) {
            if (isNameSuitable(name, tag, handler, file)) {
              return false;
            }
          }
          return true;
        });
  }
 static AbstractDomChildrenDescription findChildrenDescription(
     final XmlTag tag, final DomInvocationHandler parent) {
   final DomGenericInfoEx info = parent.getGenericInfo();
   return info.findChildrenDescription(
       parent, tag.getLocalName(), tag.getNamespace(), false, tag.getName());
 }