Package proguard.util

Class ClassNameParser

  • All Implemented Interfaces:
    StringParser

    public class ClassNameParser
    extends java.lang.Object
    implements StringParser
    This StringParser can create StringMatcher instances for regular expressions matching internal class names (or descriptors containing class names). The regular expressions can contain the following wildcards: '%' for a single internal primitive type character (V, Z, B, C, S, I, F, J, or D), '?' for a single regular class name character, '*' for any number of regular class name characters, '**' for any number of regular class name characters or package separator characters ('/'), 'L***;' for a single internal type (class name or primitive type, array or non-array), 'L///;' for any number of internal types (class names and primitive types), and '' for a reference to an earlier wildcard (n = 1, 2, ...)
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassNameParser()
      Creates a new ClassNameParser.
      ClassNameParser​(WildcardManager wildcardManager)
      Creates a new ClassNameParser 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 class 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

      • ClassNameParser

        public ClassNameParser()
        Creates a new ClassNameParser.
      • ClassNameParser

        public ClassNameParser​(WildcardManager wildcardManager)
        Creates a new ClassNameParser 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 class name matching.