Question Krishnaveni Kapu · Mar 28

get ClassMethod

how can I get the classMethod name ?
like we get class name using "$CLASSNAME($THIS)", same way I need class Method ?

Comments

Ashok Kumar T · Mar 28

You can use $$$CurrentMethod from Ensemble.inc used to get the current classmethod in your methods.

0
Krishnaveni Kapu  Mar 31 to Ashok Kumar T

Is there a way to get the calling method name ?

If a methodB() is invoked in MethodA() ;

In MethodB() , I would like to print the calling method name i.e., MethodA()

0
Ashok Kumar T  Mar 31 to Krishnaveni Kapu

You can use the $STACK to get the previous stack call information by using the level and code string. Try the below code in your method "B". it returns the previous call stack information. 

$STACK($STACK(-1)-1,"PLACE")
0