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 ) ; } }
This method builds a tree .