Package proguard.util

Class FileNameParser

java.lang.Object
proguard.util.FileNameParser
All Implemented Interfaces:
StringParser

public class FileNameParser extends Object implements StringParser
This StringParser can create StringMatcher instances for regular expressions matching file names. The regular expressions can contain the following wildcards: '?' for a single regular file name character, '*' for any number of regular file name characters, and '**' for any number of regular file name characters or directory separator characters (always including '/').
  • Constructor Details

    • FileNameParser

      public FileNameParser()
      Creates a new FileNameParser.
    • FileNameParser

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

    • parse

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