@Override
    protected final CHAINS doBuild(DeployState deployState, TreeConfigProducer<AnyConfigProducer> parent, Element chainsElement) {
        CHAINS chains = newChainsInstance(parent);

        List<Element> allChainElements = allChainElements(deployState, chainsElement);
        if (! allChainElements.isEmpty()) {
            ComponentsBuilder<COMPONENT> outerComponentsBuilder = readOuterComponents(deployState, chains, allChainElements);
            ChainsBuilder<COMPONENT, CHAIN> chainsBuilder = readChains(deployState, chains, allChainElements,
                                                                       outerComponentsBuilder.getComponentTypeByComponentName());

            addOuterComponents(chains, outerComponentsBuilder);
            addChains(chains, chainsBuilder);
        }
        return chains;
    }
NOTE: This class _must_ be abstract, due to calling subclass method in ctor.
@author Tony Vaagenes
@author gjoranv
config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java