static List < MethodParameter > extract ( String path ) { List < MethodParameter > output = new ArrayList <> ( ) ; List < String > items = split ( path ) ; if ( items . size ( ) > 0 ) { int pathIndex = 0 ; int index = 0 ; for ( String item : items ) { MethodParameter param = getParamFromPath ( item , index , pathIndex ) ; // set negative index until confirmed that needed if ( param != null ) { output . add ( param ) ; index ++ ; } pathIndex ++ ; } } return output ; }
Extract method argument parameters from path definition