private void handle(File file, String packageName) throws IOException { if ( file.isDirectory() ) { packageName = packageName + "." + file.getName(); for ( File child: file.listFiles() ) { handle(child, packageName); } } else if (file.getName().endsWith(".class") && ! file.getName().contains("$")) { addClass(packageName + "." + file.getName().replace(".class", "")); } else if (file.getName().endsWith(".jar")) { handleArchiveByFile(file); } }