code: protected void obtainProducerEndpoints(List<Node> nodes, List<EndpointInfo> endpoints,
                                  Map<String, EndpointInfo> map) {
          for (int i = 0; i < nodes.size(); i++) {
              Node node = nodes.get(i);
  
              if (node instanceof Producer) {
                  String endpoint = EndpointUtil.encodeEndpoint(node.getUri(), node.getOperation());
  
                  if (!map.containsKey(endpoint)) {
                      EndpointInfo info = new EndpointInfo();
                      info.setEndpoint(endpoint);
                      info.setType(((Producer) node).getEndpointType());
                      endpoints.add(info);
                      map.put(endpoint, info);
                  }
              }
  
              if (node instanceof ContainerNode) {
                  obtainProducerEndpoints(((ContainerNode) node).getNodes(), endpoints, map);
              }
          }
      }
docs: This method collects the information regarding endpoints for
  contained producers.
  
  @param nodes The nodes
  @param endpoints The list of endpoint info
  @param map The map of endpoints to info