public class Test
{
public void test()
{
StackTraceElement[] stacks = new Throwable().getStackTrace();
StackTraceElement currentStack = stacks[ 0 ];
System.out.println("my class : " + currentStack.getClassName());
System.out.println("my method : " + currentStack.getMethodName());
}
public static void main( String[] args )
{
new Test().test();
}
}
현재의 클래스, 메소드 이름 조회
|
2011.03.08 20:14:20
|
2011.03.08 20:14:20
|
329
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2012.08.15
2011.05.26
2011.04.12
2011.04.11
2011.03.09
2011.03.08
2009.11.11