Subj : Re: Rhino - Getting a list of functions To : Martin.Honnen From : Jeremy Gillick Date : Wed Sep 28 2005 01:14 pm Good point. Then how can I get Rhino to return the name of the property holding the anonymous function? And if I can map this with the line number it would be really great! Thanks, Jeremy Martin Honnen wrote: > > > Jeremy Gillick wrote: > > >> Given a JavaScript source file, I'm trying to get Rhino to output all >> the functions defined in that file, including nested functions (such >> as those in JS Classes) with their line number. Using the code >> below, I am able to get the name of all the top-level functions and >> their line number, however, class functions only return the line >> number and the name is blank. > > >> function plainFunc(){ >> >> } >> >> function classFunc(){ >> this.propOne = false; >> this.propTwo = "hello"; >> this.propThree = "world"; >> this.methodFuncOne = function(){ >> } > > > If you are talking about this then you have an anonymous function > expression there on the right side which does not have a name. > > .