獲取方法調用者的類名或者方法名
...
...
Description Below I present you two different ways to get the current Class: Using Thread ...
獲取class名: this.getClass().getName(); 或者 Thread.currentThread().getStackTrace()[1].getClassName(); 獲取方法名: Thread.currentThread().getStackTrace ...
java 獲取調用類的類名和方法名 ...
PHP獲取當前類名、方法名 __CLASS__ 獲取當前類名 __FUNCTION__ 當前函數名(confirm) __METHOD__ 當前方法名 (bankcard::confirm) __FUNCTION__ 函數名稱(PHP 4.3.0 新加)。自 PHP ...
1、獲取當前類名: this.getClass().getSimpleName() 也可以 2、獲取當前方法名: ...
JAVA中獲取當前運行的類名,方法名,行數 ...
public void getjoinpoint(JoinPoint jp){ String classname=jp.getTarget().getClass().getSimpleName() ...