+
+ return childMap;
+ }
+
+ private @NonNull AbstractExplicitGenerator<?, ?> resolveRuntimeChild(final Object parentArg, final QName qname) {
+ final var exact = findSchemaTreeGenerator(qname);
+ if (exact != null) {
+ return exact;
+ }
+
+ // TODO: this is quite hacky: what we are trying to do is rebase the lookup QName to parent QName, as the only
+ // way we should be arriving here is through uses -> grouping squash
+ verify(parentArg instanceof QName, "Cannot deal with parent argument %s", parentArg);
+ final var namespace = ((QName) parentArg).getModule();
+
+ verify(namespace.equals(qname.getModule()), "Cannot deal with %s in namespace %s", qname, namespace);
+ final var local = qname.bindTo(getQName().getModule());
+ return verifyNotNull(findSchemaTreeGenerator(local), "Failed to find %s as %s in %s", qname, local, this);
+ }
+
+ final @NonNull List<AbstractAugmentGenerator> augments() {
+ return augments;
+ }
+
+ private @NonNull List<AugmentRuntimeType> augmentRuntimeTypes() {
+ // Augments are attached to original instance: at least CaseGenerator is instantiated in non-original place
+ // and thus we need to go back to original
+ return getOriginal().augments.stream()
+ .map(AbstractAugmentGenerator::runtimeType)
+ .filter(Optional::isPresent)
+ .map(Optional::orElseThrow)
+ .collect(ImmutableList.toImmutableList());