mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package a;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.lang.ConsoleTable;
|
||||
import cn.hutool.core.lang.caller.CallerUtil;
|
||||
|
||||
@@ -10,15 +11,12 @@ public class A {
|
||||
public A() {
|
||||
new InnerClass() {{
|
||||
int i = 0;
|
||||
Class<?> caller = CallerUtil.getCaller(i);
|
||||
final ConsoleTable t = new ConsoleTable();
|
||||
t.addHeader("类名", "类加载器");
|
||||
System.out.println("初始化 " + getClass() + " 的调用链为: ");
|
||||
while (caller != null) {
|
||||
t.addBody(caller.toString(), caller.getClassLoader().toString());
|
||||
Console.log("初始化 " + getClass() + " 的调用链为: ");
|
||||
Class<?> caller = CallerUtil.getCaller(i);
|
||||
while (caller != null) {
|
||||
Console.log("{} {}", caller, caller.getClassLoader());
|
||||
caller = CallerUtil.getCaller(++i);
|
||||
}
|
||||
t.print();
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user