Package proguard.util
Class ListFunctionParser
java.lang.Object
proguard.util.ListFunctionParser
- All Implemented Interfaces:
StringFunctionParser
This
StringFunctionParser can create StringFunction instances for regular
expressions. The created function returns a String, or null if it doesn't match. The regular
expressions are either presented as a list, or they are interpreted as comma-separated lists,
optionally prefixed with '!' negators. If an entry with a negator matches, a negative match is
returned, without considering any subsequent entries in the list. The creation of StringFunction instances for the entries is delegated to the given StringFunctionParser.-
Constructor Summary
ConstructorsConstructorDescriptionListFunctionParser(StringFunctionParser stringFunctionParser) Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidA main method for testing name matching and replacement.Creates a StringFunction for the given regular expression.Creates a StringFunction for the given regular expression, which can be a list of optionally negated simple entries.
-
Constructor Details
-
ListFunctionParser
Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser.
-
-
Method Details
-
parse
Description copied from interface:StringFunctionParserCreates a StringFunction for the given regular expression.- Specified by:
parsein interfaceStringFunctionParser
-
parse
Creates a StringFunction for the given regular expression, which can be a list of optionally negated simple entries.An empty list results in a StringFunction that matches any string.
-
main
A main method for testing name matching and replacement.
-