A facility for getting the current method's name
Dmitry Samersoff
Dmitry.Samersoff at oracle.com
Sat Oct 1 01:11:57 PDT 2011
Behrang,
On 2011-10-01 05:49, Behrang Saeedzadeh wrote:
> By the way, now that we're into it, it would be great if we have a
> standardized byte code enhancement library (e.g. ASM). I know, I know!
> I am asking for too much! :D
ASM is laready adopted by JDK see
com.sun.xml.internal.ws.org.objectweb.asm
-Dmitry
>
> Cheers,
> Behrang
>
>> On Mon, Sep 26, 2011 at 7:31 PM, Behrang Saeedzadeh<behrangsa at gmail.com>
>> wrote:
>>>
>>> Sean, Mario,
>>>
>>> I am looking for something like JavaScript's arguments.callee.name or
>>> Ruby's __method__. AFAIK, accessing the current method's name is a
>>> very cheap operation in JS and Ruby while creating a stack trace is a
>>> moderately expensive operation in Java.
>>
>> They don't seem to be expensive in JavaScript or Ruby because those
>> languages didn't have fast implementations. Once they do (as the current JS
>> engines and JRuby/Rubinius), this kind of reflective operations will show
>> their cost.
>> Regards,
>> Kris Mok
--
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...
More information about the jdk8-dev
mailing list