Package proguard.util

Class NameParser

  • All Implemented Interfaces:
    StringParser

    public class NameParser
    extends java.lang.Object
    implements StringParser
    This StringParser can create StringMatcher instances for regular expressions matching names. The regular expressions are interpreted as comma-separated lists of names, optionally prefixed with '!' negators. If a name with a negator matches, a negative match is returned, without considering any subsequent entries in the list. The regular expressions can contain the following wildcards: '?' for a single character, '*' for any number of characters, and '' for a reference to an earlier wildcard (n = 1, 2, ...)
    • Constructor Summary

      Constructors 
      Constructor Description
      NameParser()
      Creates a new NameParser.
      NameParser​(WildcardManager wildcardManager)
      Creates a new NameParser that supports references to earlier wildcards.
    • 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.
      StringMatcher parse​(java.lang.String regularExpression)
      Creates a StringMatcher for the given regular expression.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameParser

        public NameParser()
        Creates a new NameParser.
      • NameParser

        public NameParser​(WildcardManager wildcardManager)
        Creates a new NameParser that supports references to earlier wildcards.
        Parameters:
        wildcardManager - an optional scope for StringMatcher instances that match wildcards.
    • Method Detail

      • parse

        public StringMatcher parse​(java.lang.String regularExpression)
        Description copied from interface: StringParser
        Creates a StringMatcher for the given regular expression.
        Specified by:
        parse in interface StringParser
      • main

        public static void main​(java.lang.String[] args)
        A main method for testing name matching.