Package org.eclipse.jetty.start
Class PathMatchers
- java.lang.Object
-
- org.eclipse.jetty.start.PathMatchers
-
public class PathMatchers extends java.lang.ObjectCommon PathMatcher implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPathMatchers.NonHiddenMatcher
-
Field Summary
Fields Modifier and Type Field Description private static java.nio.file.PathEMPTY_PATHprivate static char[]GLOB_CHARSprivate static char[]SYNTAXED_GLOB_CHARS
-
Constructor Summary
Constructors Constructor Description PathMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.nio.file.PathasPath(java.lang.String pattern)Convert a pattern to a Path object.private static intcountChars(java.lang.String pattern, int offset, char c)static java.nio.file.PathMatchergetMatcher(java.lang.String rawpattern)static java.nio.file.PathMatchergetNonHidden()static java.nio.file.PathgetSearchRoot(java.lang.String pattern)Provide the non-glob / non-regex prefix on the pattern as a Path reference.static booleanisAbsolute(java.lang.String pattern)Tests if provided pattern is an absolute reference (or not)private static booleanisGlob(char c, boolean syntaxed)Determine if part is a glob pattern.
-
-
-
Method Detail
-
asPath
private static java.nio.file.Path asPath(java.lang.String pattern)
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
public static java.nio.file.PathMatcher getMatcher(java.lang.String rawpattern)
-
getNonHidden
public static java.nio.file.PathMatcher getNonHidden()
-
getSearchRoot
public static java.nio.file.Path getSearchRoot(java.lang.String pattern)
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
private static int countChars(java.lang.String pattern, int offset, char c)
-
isAbsolute
public static boolean isAbsolute(java.lang.String pattern)
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
-
-