Subj : Re: Rhino - Listing all functions, properties and methods To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Sun Oct 02 2005 05:33 pm Make sure you're running in a context that interprets scripts, and doesn't compile them to bytecode. That is, set the context's optimization level to -1. If you do this, you can cast a Script object obtained through any of the Context.compileXxx methods into an InterpretedFunction: InterpretedFunction iscript = (InterpretedFunction)script; Then you can retrieve a debuggable view for it: DebuggableScript dscript = iscript.getDebuggableView(); Then you can use "int getFunctionCount()" and "DebuggableScript getFunction(int index)" methods recursively on the DebuggableScript object to walk the function tree. Attila. -- home: http://www.szegedi.org weblog: http://www.jroller.com/page/aszegedi On Fri, 30 Sep 2005 01:03:13 +0200, Jeremy Gillick wrote: > In Rhino, is there a way to list all functions, properties and methods > of a JavaScript file? So far I've been able to list all top-level > elements just fine, but I cannot seem to recursively read all nested > elements (properties, methods, etc.). Can somebody help me? > > Thanks, > Jeremy .