标签:as new c 方法 return class public rac string
public static String getCurrentMethodName() {
int level = 1;
StackTraceElement[] stacks = new Throwable().getStackTrace();
String methodName = stacks[level].getMethodName();
return methodName;
}
public static String getCurrentClassName() {
int level = 1;
StackTraceElement[] stacks = new Throwable().getStackTrace();
String className = stacks[level].getClassName();
return className;
}
标签:as new c 方法 return class public rac string
原文地址:http://www.cnblogs.com/shortboy/p/4097272.html