Package proguard.util
Class ListFunctionParser
- java.lang.Object
-
- proguard.util.ListFunctionParser
-
- All Implemented Interfaces:
StringFunctionParser
public class ListFunctionParser extends java.lang.Object implements StringFunctionParser
ThisStringFunctionParser
can createStringFunction
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 ofStringFunction
instances for the entries is delegated to the givenStringFunctionParser
.
-
-
Constructor Summary
Constructors Constructor Description ListFunctionParser(StringFunctionParser stringFunctionParser)
Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
A main method for testing name matching and replacement.StringFunction
parse(java.lang.String regularExpression)
Creates a StringFunction for the given regular expression.StringFunction
parse(java.util.List regularExpressions)
Creates a StringFunction for the given regular expression, which can be a list of optionally negated simple entries.
-
-
-
Constructor Detail
-
ListFunctionParser
public ListFunctionParser(StringFunctionParser stringFunctionParser)
Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser.
-
-
Method Detail
-
parse
public StringFunction parse(java.lang.String regularExpression)
Description copied from interface:StringFunctionParser
Creates a StringFunction for the given regular expression.- Specified by:
parse
in interfaceStringFunctionParser
-
parse
public StringFunction parse(java.util.List regularExpressions)
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
public static void main(java.lang.String[] args)
A main method for testing name matching and replacement.
-
-