How do i get current method name?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How do i get current method name?

Michael Pitoniak

team,

 how do i get the name of the method that is currently executing?

i assumed it would be in namespace, but apparently not.

ex:

public foo(){

        System.out.println("I am in: "   + ?????? + "method");

}


thx,

mike
Reply | Threaded
Open this post in threaded view
|

Re: How do i get current method name?

Daniel Wunsch
>  how do i get the name of the method that is currently executing?

public foo(){
    System.out.println("I am in: "   + this.namespace.Name + " method");
}
foo();

daniel


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: How do i get current method name?

Michael Pitoniak

Dan,

 many thanks. i was looking for a method and totally failed to conside a property :)

best regards,

mike


Daniel Wunsch <[hidden email]>
Sent by: [hidden email]

10/06/2005 02:09 PM

To
[hidden email]
cc
Subject
Re: [Beanshell-users] How do i get current method name?





>  how do i get the name of the method that is currently executing?

public foo(){
   System.out.println("I am in: "   + this.namespace.Name + " method");
}
foo();

daniel


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users

Reply | Threaded
Open this post in threaded view
|

Re: How do i get current method name?

patniemeyer
> Dan,
>
>  many thanks. i was looking for a method and totally failed to conside a
> property :)

this.namespace.getName() works too.


Pat



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users