public static List<String> extractParameters(String rawRoute) {
        List<String> list = new ArrayList<>();

        Matcher m = PATH_PARAMETER_REGEX.matcher(rawRoute);

        while (m.find()) {
            if (m.group(1).indexOf('<') != -1) {
                // Regex case name<reg>
                list.add(m.group(1).substring(0, m.group(1).indexOf('<')));
            } else if (m.group(1).indexOf('*') != -1) {
                // Star case name*
                list.add(m.group(1).substring(0, m.group(1).indexOf('*')));
            } else if (m.group(1).indexOf('+') != -1) {
                // Plus case name+
                list.add(m.group(1).substring(0, m.group(1).indexOf('+')));
            } else {
                // Basic case (name)
                list.add(m.group(1));
            }
        }

        return list;
    }
public static List < String > extractParameters ( String rawRoute ) { List < String > list = new ArrayList < > ( ) ; Matcher m = PATH_PARAMETER_REGEX . matcher ( rawRoute ) ; while ( m . find ( ) ) { if ( m . group ( 1 ) . indexOf ( '<' ) != - 1 ) { list . add ( m . group ( 1 ) . substring ( 0 , m . group ( 1 ) . indexOf ( '<' ) ) ) ; } else if ( m . group ( 1 ) . indexOf ( '*' ) != - 1 ) { list . add ( m . group ( 1 ) . substring ( 0 , m . group ( 1 ) . indexOf ( '*' ) ) ) ; } else if ( m . group ( 1 ) . indexOf ( '+' ) != - 1 ) { list . add ( m . group ( 1 ) . substring ( 0 , m . group ( 1 ) . indexOf ( '+' ) ) ) ; } else { list . add ( m . group ( 1 ) ) ; } } return list ; }
Extracts the name of the parameters from a route.
<p/>
/{my_id}/{my_name}
<p/>
would return a List with "my_id" and "my_name"

@param rawRoute the route's uri
@return a list with the names of all parameters in that route.