From 22431bac5148aaf34a17b3278107ce5c0da21d92 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 25 Oct 2021 11:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=85=A5=E4=BC=9A=E6=B5=81=E7=A8=8Bv2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standardApplyMeetProcess/Kev.java | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/main/java/com/ydw/bat/wkflow/listener/standardApplyMeetProcess/Kev.java 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