Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
Currently MetaClass.getClassNode() tries to recompile a given Groovy class to gain access to the AST. This doesn't work when using groovy scripts that are not on the classpath (eg. GroovyShell) and you would have to do it yourself.
With the following patch the ClassNode of every compiled class will be saved and available for access later.
One example where a missing ClassNode causes problems:
groovy.sql.DataSet when used inside a GroovyShell script doesn't work since the AST will not be found to walk the closure.
Attachments
Attachments
Issue Links
- relates to
-
GROOVY-2450 DataSet.findAll does not work directly from script outside CLASSPATH or in pre-compiled bytecode (*.class file)
- Closed