public class FileNameParser extends java.lang.Object implements StringParser
StringParser
can create StringMatcher
instances for regular expressions
matching file names. The regular expressions can contain the following wildcards: '?' for a
single regular file name character, '*' for any number of regular file name characters, and '**'
for any number of regular file name characters or directory separator characters (always
including '/').Constructor and Description |
---|
FileNameParser()
Creates a new FileNameParser.
|
FileNameParser(WildcardManager wildcardManager)
Creates a new FileNameParser that supports references to earlier wildcards.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
A main method for testing file name matching.
|
StringMatcher |
parse(java.lang.String regularExpression)
Creates a StringMatcher for the given regular expression.
|
public FileNameParser()
public FileNameParser(WildcardManager wildcardManager)
wildcardManager
- an optional scope for StringMatcher instances that match wildcards.public StringMatcher parse(java.lang.String regularExpression)
StringParser
parse
in interface StringParser
public static void main(java.lang.String[] args)