Andrew Haley wrote: > The current gnu.classpath.VMStackWalker interface is inefficient. > > Sun provide: > > sun.reflect.reflection.getCallerClass(int depth) > > and for the same function we would do > > VMStackWalker.getClassContext()[depth]; > > You see the difference: Classpath's VMStackWalker enumerates the whole > stack, whereas Sun's only has to enumerate a few stack frames. Actually, Sun simply has a bad design. There is no need for arbitrary depth caller class discovery (as our codebase demonstrates). However, now that we've got the reference j.u.c implementation it makes sense to add a method to VMStackWalker that enables us to more efficiently implement sun.reflect.reflection.getCallerClass. Regards, Jeroen