Package proguard.util

Class ListFunctionParser

java.lang.Object
proguard.util.ListFunctionParser
All Implemented Interfaces:
StringFunctionParser

public class ListFunctionParser extends 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
    Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    A main method for testing name matching and replacement.
    parse(String regularExpression)
    Creates a StringFunction for the given regular expression.
    parse(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 Details

    • ListFunctionParser

      public ListFunctionParser(StringFunctionParser stringFunctionParser)
      Creates a new ListFunctionParser that parses individual elements in the comma-separated list with the given StringFunctionParser.
  • Method Details

    • parse

      public StringFunction parse(String regularExpression)
      Description copied from interface: StringFunctionParser
      Creates a StringFunction for the given regular expression.
      Specified by:
      parse in interface StringFunctionParser
    • parse

      public StringFunction parse(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(String[] args)
      A main method for testing name matching and replacement.