StackTraceElement[] stacks = (new Throwable()).getStackTrace(); for (StackTraceElement stack : stacks) { System.out.println(stack.getClassName() + "-" + stack.getMethodName()); }
看源码的时候,对于找类有点作用
StackTraceElement[] stacks = (new Throwable()).getStackTrace(); for (StackTraceElement stack : stacks) { System.out.println(stack.getClassName() + "-" + stack.getMethodName()); }
看源码的时候,对于找类有点作用