Interface PathPattern
-
public interface PathPatternAn interface defines methods for HTTP path pattern.- Since:
- 1.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static PathPatternbuild(java.lang.String pathPattern)Build a newPathPatternfrom HTTP path pattern.default java.util.regex.Matchermatcher(java.lang.String path)Returns a matcher that will match the givenpathagainst this pattern.java.util.List<java.lang.String>pathVariableNames()Returns the list contains the names of path variables.java.util.regex.Patternpattern()Returns the compiled representation of a regular expression.
-
-
-
Method Detail
-
build
static PathPattern build(java.lang.String pathPattern) throws java.lang.IllegalArgumentException
Build a newPathPatternfrom 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 givenpathagainst 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
-
-