|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectproguard.util.BasicListMatcher
This StringMatcher tests whether strings match an entry in a given list of regular expressions. The list is given as a comma-separated string or as a List of strings. An exclamation mark preceding a list entry acts as a negator: if the expression matches, a negative match is returned, without considering any subsequent entries. If none of the entries match, a positive match is returned depending on whether the last regular expression had a negator or not.
The individual regular expression matching is delegated to a StringMatcher
that is created by the #createBasicMatcher(String} method. If it is
not overridden, this method returns a BasicMatcher.
BasicMatcher| Constructor Summary | |
BasicListMatcher(List regularExpressionList)
Creates a new BasicListMatcher. |
|
BasicListMatcher(String regularExpression)
Creates a new BasicListMatcher. |
|
| Method Summary | |
protected StringMatcher |
createBasicMatcher(String regularExpression)
Creates a new StringMatcher for the given regular expression. |
static void |
main(String[] args)
A main method for testing string matching. |
boolean |
matches(String string)
Checks whether the given string matches. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicListMatcher(String regularExpression)
regularExpression - the comma-separated list of regular expressions
against which strings will be matched.public BasicListMatcher(List regularExpressionList)
regularExpressionList - the list of regular expressions against which
strings will be matched.| Method Detail |
protected StringMatcher createBasicMatcher(String regularExpression)
public boolean matches(String string)
StringMatcher
matches in interface StringMatcherstring - the string to match.
public static void main(String[] args)
|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||