Package proguard.util

Class ListFunctionParser

  • All Implemented Interfaces:
    StringFunctionParser

    public class ListFunctionParser
    extends java.lang.Object
    implements 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

      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.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.