获取当前运行的类名或者方法
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;
	}
 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号