public Builder(Chains config) { id(config.id()); type(config.type()); components(config.components()); inherits(config.inherits()); excludes(config.excludes()); for (Phases p : config.phases()) { phases(new Phases.Builder(p)); } }
private static <T extends Chain> ChainsConfig.Chains.Builder getChain(T chain) { ChainSpecification specification = chain.getChainSpecification(); return new ChainsConfig.Chains.Builder() .type(chain.getType()) .id(specification.componentId.stringValue()) .components(getComponents(specification.componentReferences)) .inherits(getComponents(specification.inheritance.chainSpecifications)) .excludes(getComponents(specification.inheritance.excludedComponents)) .phases(getPhases(specification.phases())); }