diff --git a/src/main/java/com/ydw/bat/wkflow/listener/standardApplyMeetProcess/Kev.java b/src/main/java/com/ydw/bat/wkflow/listener/standardApplyMeetProcess/Kev.java new file mode 100644 index 00000000..b1d6957b --- /dev/null +++ b/src/main/java/com/ydw/bat/wkflow/listener/standardApplyMeetProcess/Kev.java @@ -0,0 +1,51 @@ +package com.ydw.bat.wkflow.listener.standardApplyMeetProcess; + + +/** + * + * |Debug|调试; |Run|运行使用; |Library|参考移植; + * + * Author:Kevin + * Version:1.2.2 + */ +public class Kev { + + + + /** + * |debug;输出方法名,类名 + */ + public static void showClassFunction(){ + StackTraceElement e = new Exception().getStackTrace()[1]; + String className = e.getClassName(); + String functionName = e.getMethodName(); +// String packageName = e.getClass().getPackage().getName(); +// String className = e.getClass().getSimpleName();//此方法方便看 +// String rat = ".\n" + packageName + "." + className + " [" + functionName + "]" + ">>>>>"; + String rat = className + " [" + functionName + "] " + ">>>>> "; + System.out.format("\33[32;4m" + rat); + } + public static void showClassFunction(int index){ + StackTraceElement e = new Exception().getStackTrace()[index]; + String className = e.getClassName(); + String functionName = e.getMethodName(); + String rat = className + " [" + functionName + "] " + ">>>>> "; + System.out.format("\33[32;4m" + rat); + } + + // 显示当前运行的函数--用于调试,将输出结果与函数名匹配输出 +// public static void showFunction(){ +// String _thisMethodName = new Exception().getStackTrace()[1].getMethodName();// 获得当前的方法名 +// String rat = "[" + _thisMethodName + "]" + ">>>>>"; +// System.out.format("\33[32;4m" + rat); +// } + + +// 显示第n级函数名 +// public static void showFunction(int index){ +// String _thisMethodName = new Exception().getStackTrace()[index].getMethodName(); +// String rat = "[" + _thisMethodName + "]" + ">>>>>"; +// System.out.format("\33[32;4m" + rat); +// } + +} \ No newline at end of file