Package org.eclipse.jetty.start
Class PathMatchers
java.lang.Object
org.eclipse.jetty.start.PathMatchers
Common PathMatcher implementations.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Path
private static final char[]
private static final char[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Path
Convert a pattern to a Path object.private static int
countChars
(String pattern, int offset, char c) static PathMatcher
getMatcher
(String rawpattern) static PathMatcher
static Path
getSearchRoot
(String pattern) Provide the non-glob / non-regex prefix on the pattern as a Path reference.static boolean
isAbsolute
(String pattern) Tests if provided pattern is an absolute reference (or not)private static boolean
isGlob
(char c, boolean syntaxed) Determine if part is a glob pattern.
-
Field Details
-
GLOB_CHARS
private static final char[] GLOB_CHARS -
SYNTAXED_GLOB_CHARS
private static final char[] SYNTAXED_GLOB_CHARS -
EMPTY_PATH
-
-
Constructor Details
-
PathMatchers
public PathMatchers()
-
-
Method Details
-
asPath
Convert a pattern to a Path object.- Parameters:
pattern
- the raw pattern (can contain "glob:" or "regex:" syntax indicator)- Returns:
- the Path version of the pattern provided.
-
getMatcher
-
getNonHidden
-
getSearchRoot
Provide the non-glob / non-regex prefix on the pattern as a Path reference.- Parameters:
pattern
- the pattern to test- Returns:
- the Path representing the search root for the pattern provided.
-
countChars
-
isAbsolute
Tests if provided pattern is an absolute reference (or not)- Parameters:
pattern
- the pattern to test- Returns:
- true if pattern is an absolute reference.
-
isGlob
private static boolean isGlob(char c, boolean syntaxed) Determine if part is a glob pattern.- Parameters:
c
- the char to checksyntaxed
- true if overall pattern is syntaxed with"glob:"
or"regex:"
- Returns:
- true if part has glob characters
-