1 17 package org.objectweb.jonas.ant; 18 19 import java.io.File ; 20 import java.io.FilenameFilter ; 21 22 public class InnerClassFilenameFilter implements FilenameFilter { 23 24 private String baseClassName; 25 26 InnerClassFilenameFilter(String baseclass) { 27 int extidx = baseclass.lastIndexOf(".class"); 28 if (extidx == -1) { 29 extidx = baseclass.length() - 1; 30 } 31 baseClassName = baseclass.substring(0, extidx); 32 } 33 34 public boolean accept(File Dir, String filename) { 35 if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) 36 || (filename.indexOf(baseClassName + "$") != 0)) { 37 return false; 38 } 39 return true; 40 } 41 } | Popular Tags |