public class NameParser extends java.lang.Object implements StringParser
StringParser can create StringMatcher instances for regular expressions
matching names. The regular expressions are interpreted as comma-separated
lists of names, optionally prefixed with '!' negators.
If a name with a negator matches, a negative match is returned, without
considering any subsequent entries in the list.
The regular expressions can contain the following wildcards:
'?' for a single character,
'*' for any number of characters, and
'| Constructor and Description |
|---|
NameParser()
Creates a new NameParser.
|
NameParser(WildcardManager wildcardManager)
Creates a new NameParser that supports references to earlier
wildcards.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
A main method for testing name matching.
|
StringMatcher |
parse(java.lang.String regularExpression)
Creates a StringMatcher for the given regular expression.
|
public NameParser()
public NameParser(WildcardManager wildcardManager)
wildcardManager - an optional scope for StringMatcher instances
that match wildcards.public StringMatcher parse(java.lang.String regularExpression)
StringParserparse in interface StringParserpublic static void main(java.lang.String[] args)