code: private List<String> findjarFiles(String baseDirName) {
          List<String> classFiles = Lists.newArrayList();
          File baseDir = new File(baseDirName);
          if (!baseDir.exists() || !baseDir.isDirectory()) {
              LOG.error("file search error:" + baseDirName + " is not a dir！");
          } else {
              File[] files = baseDir.listFiles();
              for (File file : files) {
                  if (file.isDirectory()) {
                      classFiles.addAll(findjarFiles(file.getAbsolutePath()));
                  } else {
                      if (includeAllJarsInLib || includeJars.contains(file.getName())) {
                          JarFile localJarFile = null;
                          try {
                              localJarFile = new JarFile(new File(baseDirName + File.separator + file.getName()));
                              Enumeration<JarEntry> entries = localJarFile.entries();
                              while (entries.hasMoreElements()) {
                                  JarEntry jarEntry = entries.nextElement();
                                  String entryName = jarEntry.getName();
                                  if (scanPackages.isEmpty()) {
                                      if (!jarEntry.isDirectory() && entryName.endsWith(".class")) {
                                          String className = entryName.replaceAll(File.separator, ".").substring(0, entryName.length() - 6);
                                          classFiles.add(className);
                                      }
                                  } else {
                                      for (String scanPackage : scanPackages) {
                                          scanPackage = scanPackage.replaceAll("\\.", "\\" + File.separator);
                                          if (!jarEntry.isDirectory() && entryName.endsWith(".class") && entryName.startsWith(scanPackage)) {
                                              String className = entryName.replaceAll(File.separator, ".").substring(0, entryName.length() - 6);
                                              classFiles.add(className);
                                          }
                                      }
                                  }
                              }
                          } catch (IOException e) {
                              e.printStackTrace();
                          } finally {
                              try {
                                  if (localJarFile != null) {
                                      localJarFile.close();
                                  }
                              } catch (IOException e) {
                                  e.printStackTrace();
                              }
                          }
                      }
                  }
  
              }
          }
          return classFiles;
      }
docs: 查找jar包中的class