]> source.dussan.org Git - aspectj.git/commitdiff
FileFilters for zip files and source files
authorwisberg <wisberg>
Fri, 31 Oct 2003 19:32:29 +0000 (19:32 +0000)
committerwisberg <wisberg>
Fri, 31 Oct 2003 19:32:29 +0000 (19:32 +0000)
util/src/org/aspectj/util/FileUtil.java

index c9d5fe32450df3a1d55e1b1c7052aca8c1b700bc..a15600054c7c7e4805467ca0bb2f6fc19205f5e6 100644 (file)
@@ -31,6 +31,24 @@ public class FileUtil {
     public static final List SOURCE_SUFFIXES
         = Collections.unmodifiableList(Arrays.asList(new String[] { ".java", ".aj"}));
     
+    public static final FileFilter ZIP_FILTER = new FileFilter() {
+        public boolean accept(File file) {
+            return hasZipSuffix(file);
+        }
+        public String toString() { 
+            return "ZIP_FILTER"; 
+        }
+    };
+
+    public static final FileFilter SOURCE_FILTER = new FileFilter() {
+        public boolean accept(File file) {
+            return hasSourceSuffix(file);
+        }
+        public String toString() { 
+            return "SOURCE_FILTER"; 
+        }
+    };
+
     final static int[] INT_RA = new int[0];
     
     /** accept all files */