public class PathMatcher extends Object implements Matcher
Constructor and Description |
---|
PathMatcher() |
Modifier and Type | Method and Description |
---|---|
PathMatcher |
excludeBranch(String path)
Convenience method for excluding all paths starting with a prefix e.g.
|
PathMatcher |
excludePath(String path)
Any path exactly matching this string will be excluded.
|
PathMatcher |
excludeRegex(String regex)
Any path matching this regex will be excluded.
|
Set<String> |
getExcludedPaths() |
Set<Pattern> |
getExcludedPatterns() |
boolean |
matches(WebContext context)
Check if the web context matches.
|
void |
setExcludedPaths(Collection<String> paths) |
void |
setExcludedPatterns(Collection<String> regularExpressions) |
public PathMatcher excludePath(String path)
path
- the path to be excludedpublic PathMatcher excludeBranch(String path)
path
- the prefix for the paths to be excludedpublic PathMatcher excludeRegex(String regex)
regex
- the regular expression matching the paths to be excludedpublic boolean matches(WebContext context)
Matcher
public void setExcludedPaths(Collection<String> paths)
public void setExcludedPatterns(Collection<String> regularExpressions)
Copyright © 2017. All rights reserved.