[PATCH] 4851444: Exposing sun.reflect.Reflection#getCallerClass as a public API in Java 8
blackdrag at gmx.org
Fri Sep 20 09:04:09 UTC 2013
Am 20.09.2013 10:50, schrieb Jörn Huxhorn:
> But I have serious doubts that *this* is going to be more efficient than just iterating over an array.
> Feel free to add all that functionality but all we are asking for right now is access to the call stack array in a way that is as fast, or, ideally, even faster than using the current getCallerClass(int) method. Performance is the main reason for this whole discussion.
when it comes to getCallerClass(int) I see need for improvement in the
API. But I see the patch as a draft only
> And it is very, very crucial that all of this can be done via (Java 6) reflection so that code will be able to use sun.reflect.Reflection up to J7 and the new API after that...
you mean you want to use the new API via Java6 reflection? Then there
should be no new class to be used. Otherwise you will get crazy with
writing out all the reflective calls. I think it is better to go with a
plugin-like structure and write code for the new API with JDK8. I am of
course aware, that this makes the build more complicated
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org
More information about the core-libs-dev