类 ScanUtil


  • public class ScanUtil
    extends Object
    该工具类用于扫描classpath中所有的类,包含jar文件中的class和文件夹下的class The utility class is used to scan all classes in the classpath, including the class in the jar file and the class under the folder.
    作者:
    Eva Wang
    • 构造器详细资料

      • ScanUtil

        public ScanUtil()
    • 方法详细资料

      • scan

        public static List<Class> scan​(String packageName)
        扫描执行包名称下的所有类型 Scans all types under the package name.
        参数:
        packageName - 要扫描的包路径,如果传入的路径为空,默认为“io.nuls”/The package path to be scanned.If the incoming path is empty, the default is "IO. Nuls"
        返回:
        所有扫描到的类型的列表/List of all scanned types.
      • findClassLocal

        public static void findClassLocal​(String packageName,
                                          String filePath,
                                          List<Class> list)
        扫描所有本地类型,将扫描到的结果添加到类型列表中 Scan all local types and add the scanned results to the list of types.
        参数:
        packageName - 要扫描的包路径/The package path to be scanned.
        filePath - 文件路径
        list - 结果列表