CollectionElementInvocationHandler (XmlTag tag, DomCollectionChildDescription description, DomInvocationHandler parent, XmlTag parentTag) { DomStub parentStub = parent.getStub(); if (parentStub != null) { int index = JBIterable .of(findSubTagsWithoutIncludes(parentTag, tag.getLocalName(), tag.getNamespace())) .filter(t -> !(t instanceof IncludedXmlTag)) .indexOf(t -> t == tag); ElementStub stub = parentStub.getElementStub(tag.getName(), index); if (stub != null) { XmlName name = description.getXmlName(); EvaluatedXmlNameImpl evaluatedXmlName = EvaluatedXmlNameImpl.createEvaluatedXmlName(name, name.getNamespaceKey(), true); return new CollectionElementInvocationHandler(evaluatedXmlName, (AbstractDomChildDescriptionImpl)description, parent.getManager(), stub); } } return new CollectionElementInvocationHandler(description.getType(), tag, (AbstractCollectionChildDescription)description, parent, null); }