0

Possible Duplicate:
How to get method name from JavaScript file

I want to fetch Java Script function name in my Java file.I mean i want some solution so that i can go traverse my JS File,find out function name & list out them in my Java file.Is there any way so that i link my JS File,its function name with Java?

Community
  • 1
  • 1
Eshika
  • 321
  • 1
  • 8
  • 20

1 Answers1

1

You need to parse the javascript file. You can try to use the parser from Rhino, a quick google search shows this thread discussing how to do it.

sbridges
  • 24,960
  • 4
  • 64
  • 71
  • Thanks for help.I have followed Rhino example which are given in "http://en.wikipedia.org/wiki/Rhino_%28JavaScript_engine%29#Example",With it i am able to call JS function but if i want to call method of external JS file,it shows me "no such method:hello".How can i solve it? – Eshika Aug 03 '11 at 09:49
  • I am able to solve above problem.Is there any way that i can know that how many function are there in JS file and what is their name? – Eshika Aug 03 '11 at 11:11