StackTraceElement [] elements = new Throwable().getStackTrace();
for(int i = 0 ; i < elements.length ; i++){
	String clz = elements[i].getClassName();
	String method = elements[i].getMethodName();
	System.out.println(i+"번째 호출된 Stack : "+clz+"."+method);
}

+ Recent posts