commons-file/src/main/java/info/monitorenter/cpdetector/io/ClassFileFilterIsA.java
public boolean accept(File pathname) {
    boolean ret = false;
    if (pathname.isDirectory()) {
      ret = true;
    }
    else {
      String ext = FileUtil.cutExtension(pathname.getName()).getValue().toString();
      if (ext.equals("jar")) {
        // is a "directory":
        ret = true;
      }
      else if (ext.equals("class")) {
        Class cl = this.forFile(pathname);
        if (cl != null) {
          ret = this.accept(cl);
        }
      }
      else {
        ret = false;
      }
    }
    return ret;
  }
public boolean accept(File pathname) {
    boolean ret = false;
    if (pathname.isDirectory()) {
      ret = true;
    }
    else {
      String ext = FileUtil.cutExtension(pathname.getName()).getValue().toString();
      if (ext.equals("jar")) {
        // is a "directory":
        ret = true;
      }
      else if (ext.equals("class")) {
        Class cl = this.forFile(pathname);
        if (cl != null) {
          ret = this.accept(cl);
        }
      }
      else {
        ret = false;
      }
    }
    return ret;
  }
public boolean accept ( File pathname ) { boolean ret = false ; if ( pathname . isDirectory ( ) ) { ret = true ; } else { String ext = FileUtil . cutExtension ( pathname . getName ( ) ) . getValue ( ) . toString ( ) ; if ( ext . equals ( "jar" ) ) { // is a "directory": ret = true ; } else if ( ext . equals ( "class" ) ) { Class cl = this . forFile ( pathname ) ; if ( cl != null ) { ret = this . accept ( cl ) ; } } else { ret = false ; } } return ret ; }
Tries to detect (from the file path and the Classloaders urls) and load the
corresponding class and delegates to {@link #accept(Class)}.

@see java.io.FileFilter#accept(java.io.File)
Tries to detect ( from the file path and the Classloaders urls ) and load the corresponding class and delegates to { @link #accept ( Class ) } .