void (List<XmlElementDescriptor> elements) { switch (myGroup.getGroupType()) { case SEQUENCE -> { getLastChild(); while (myLastChild != null) { myLastChild.getPossibleElements(elements); if (myLastChild.myGroup.getMinOccurs() == 0) { myLastChild = getNextSubGroup(); } else return; } } case CHOICE, ALL, GROUP -> { for (XmlElementsGroup group : myGroup.getSubGroups()) { new XmlContentDFAImpl(group).getPossibleElements(elements); } } case LEAF -> ContainerUtil.addIfNotNull(elements, myGroup.getLeafDescriptor()); } }