code: protected static void buildTree(EndpointPart parent, String[] parts, int index, String endpointType) {
          // Check if operation qualifier is part of last element
          String name = parts[index];
          String qualifier = null;
  
          if (index == parts.length - 1) {
              qualifier = EndpointUtil.decodeEndpointOperation(parts[index], false);
              name = EndpointUtil.decodeEndpointURI(parts[index]);
          }
  
          // Check if part is defined in the parent
          EndpointPart child = parent.addChild(name);
  
          if (index < parts.length - 1) {
              buildTree(child, parts, index + 1, endpointType);
          } else {
              // Check if part has an operation qualifier
              if (qualifier != null) {
                  child = child.addChild(qualifier);
                  child.setQualifier(true);
              }
              child.setEndpointType(endpointType);
          }
      }
docs: This method builds a tree.
  
  @param parent The current parent node
  @param parts The parts of the URI being processed
  @param index The current index into the parts array
  @param endpointType The endpoint type