void (@NotNull final MyElement element, @NotNull final DomExtensionsRegistrar registrar) { final String value = element.getAttr().getValue(); if (value != null) { final ParameterizedType type = new ParameterizedTypeImpl(GenericDomValue.class, StringBuffer.class); final DomExtension extension = registrar.registerFixedNumberChildExtension(new XmlName(value), type).setConverter(new MyStringBufferConverter(true), true); extension.addExtender(new DomExtender<GenericDomValue<StringBuffer>>(){ @Override public void registerExtensions(@NotNull final GenericDomValue<StringBuffer> stringBufferGenericDomValue, @NotNull final DomExtensionsRegistrar registrar) { registrar.registerGenericAttributeValueChildExtension(new XmlName("aaa"), String.class); } }); ((DomExtensionsRegistrarImpl)registrar).registerFixedNumberChildrenExtension(new XmlName("yyy"), MyElement.class, 2); } }