public class HandlerChainsInfoBuilder {
public HandlerChainsInfo build(HandlerChains handlerChains) {
HandlerChainsInfo handlerChainsInfo = new HandlerChainsInfo();
for (HandlerChain handlerChain : handlerChains.getHandlerChain()) {
HandlerChainInfo handlerChainInfo = new HandlerChainInfo();
if (handlerChain.getServiceNamePattern() != null) {
handlerChainInfo.serviceNamePattern = handlerChain.getServiceNamePattern();
} else if (handlerChain.getPortNamePattern() != null) {
handlerChainInfo.portNamePattern = handlerChain.getPortNamePattern();
} else if (handlerChain.getProtocolBindings() != null) {