Interface PathPattern


  • public interface PathPattern
    An interface defines methods for HTTP path pattern.
    Since:
    1.1
    • Method Detail

      • build

        static PathPattern build​(java.lang.String pathPattern)
                          throws java.lang.IllegalArgumentException
        Build a new PathPattern from HTTP path pattern.
        Parameters:
        pathPattern - the pattern of HTTP path
        Returns:
        a PathPattern
        Throws:
        java.lang.IllegalArgumentException - if the path variable is illegal
      • pattern

        java.util.regex.Pattern pattern()
        Returns the compiled representation of a regular expression.
        Returns:
        the compiled representation of a regular expression
      • matcher

        default java.util.regex.Matcher matcher​(java.lang.String path)
        Returns a matcher that will match the given path against this pattern.
        Parameters:
        path - the path
        Returns:
        a matcher for this pattern
      • pathVariableNames

        java.util.List<java.lang.String> pathVariableNames()
        Returns the list contains the names of path variables.
        Returns:
        the list contains the names of path variables