提交 6d4c747a authored 作者: 黄承天's avatar 黄承天

代码规范修改

上级 06ae238a
......@@ -33,10 +33,14 @@ public class ClassUtil {
return classes;
}
//通过文件路径加载所有类 root 主要用来替换path中前缀(除包路径以外的路径)
/**
* 通过文件路径加载所有类 root 主要用来替换path中前缀(除包路径以外的路径)
*/
private static void loadClassByPath(String root, String path, List<Class<?>> list, ClassLoader load) {
File f = new File(path);
if (root == null) root = f.getPath();
if (root == null) {
root = f.getPath();
}
//判断是否是class文件
if (f.isFile() && f.getName().matches("^.*\\.class$")) {
try {
......@@ -49,7 +53,9 @@ public class ClassUtil {
}
} else {
File[] fs = f.listFiles();
if (fs == null) return;
if (fs == null) {
return;
}
for (File file : fs) {
loadClassByPath(root, file.getPath(), list, load);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论