1 21 package proguard.util; 22 23 import java.util.List ; 24 25 34 public class FileNameListMatcher extends BasicListMatcher 35 { 36 41 public FileNameListMatcher(String regularExpression) 42 { 43 super(regularExpression); 44 } 45 46 47 52 public FileNameListMatcher(List regularExpressionList) 53 { 54 super(regularExpressionList); 55 } 56 57 58 60 protected StringMatcher createBasicMatcher(String regularExpression) 61 { 62 return new FileNameMatcher(regularExpression); 63 } 64 65 66 69 public static void main(String [] args) 70 { 71 try 72 { 73 System.out.println("Regular expression ["+args[0]+"]"); 74 FileNameListMatcher matcher = new FileNameListMatcher(args[0]); 75 for (int index = 1; index < args.length; index++) 76 { 77 String string = args[index]; 78 System.out.print("String ["+string+"]"); 79 System.out.println(" -> match = "+matcher.matches(args[index])); 80 } 81 } 82 catch (Exception ex) 83 { 84 ex.printStackTrace(); 85 } 86 } 87 } 88 | Popular Tags |