public class PathPatternCompiler extends AbstractGlobPatternCompiler
PatternCompiler interface that compiles
path-glob-patterns. A path-glob-pattern is like a glob-pattern but more specific
for matching directory paths:
'?' matches any character except for a slash ('/' or '\\').'*' matches a sequence of characters excluding slashes including the empty sequence.'**' matches any sequence of characters (including slashes).'/' matches a slash ('/' or '\\').'**/' matches any sequence terminated by a slash as well as the empty sequence.A*bc?e matches Abcde or AFOObarbcxe but NOT abcde or Abce.| Modifier and Type | Field and Description |
|---|---|
static PatternCompiler |
INSTANCE
A singleton instance of this instance.
|
| Constructor and Description |
|---|
PathPatternCompiler()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
process(char[] chars,
int charIndex,
StringBuilder buffer)
This method processes one or many characters from
chars starting at the given charIndex and adds
the translated regexp-sequence to buffer. |
compile, convertPattern, isRequireWildcardpublic static final PatternCompiler INSTANCE
protected int process(char[] chars,
int charIndex,
StringBuilder buffer)
AbstractGlobPatternCompilerchars starting at the given charIndex and adds
the translated regexp-sequence to buffer.process in class AbstractGlobPatternCompilerchars - are the characters of the original pattern string.charIndex - is the current index in chars.buffer - is where the translated regexp-pattern is appended to.charIndex + 1).Copyright © 2001–2016 mmm-Team. All rights reserved.