Class PathPattern

    • Field Detail

      • EMPTY_PATTERN

        public static final PathPattern EMPTY_PATTERN
        Empty path pattern matching only empty string.
      • END_OF_PATH_PATTERN

        public static final PathPattern END_OF_PATH_PATTERN
        Path pattern matching the end of a URI path. Can be either empty "" or contain a trailing slash "/".
      • OPEN_ROOT_PATH_PATTERN

        public static final PathPattern OPEN_ROOT_PATH_PATTERN
        Path pattern matching the any URI path.
      • COMPARATOR

        public static final java.util.Comparator<PathPattern> COMPARATOR
        Path pattern comparator that defers to comparing the templates associated with the patterns.
    • Method Detail

      • asClosed

        public static PathPattern asClosed​(PathPattern pattern)
        Return a new path pattern with a same path template but a closed right hand path.
        Parameters:
        pattern - an (open) path pattern to convert to a closed pattern.
        Returns:
        closed path pattern for the same path template.
      • postfixWithCapturingGroup

        private static java.lang.String postfixWithCapturingGroup​(java.lang.String regex)
      • postfixWithCapturingGroup

        private static java.lang.String postfixWithCapturingGroup​(java.lang.String regex,
                                                                  PathPattern.RightHandPath rhpp)
      • addIndexForRightHandPathCapturingGroup

        private static int[] addIndexForRightHandPathCapturingGroup​(int numberOfGroups,
                                                                    int[] indexes)