Is there a way to parse all all the classes in a groovy script? To Parse ONE clase right now:
java.lang.Class clazz = groovyClassLoader.parseClass(new File("MainApp.groovy"))
MainApp.groovy: class MainApp { def doIt() {} }
class OtherMainApp { def doTheRest() {} }
This will return only MainApp.
I would like something like this:
java.lang.Class[] clazz = groovyClassLoader.parseClass(new File("MainApp.groovy"))
where claszz contains will contain MainApp class and OtherMainAppClass
Basically I want to be able to extract all the declared classes in a script.
Because of the nature of the app that I'm builgin groovyc command won't help
Thanks,
Federico