Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
Sometimes you need to be able to load classes implemented in Groovy and have them reload etc, while sharing the same script root URLs and so on.
So my suggestion is to add a method to GroovyScriptEngine:
public Class getClassByName( classname)
This reuses the existing code for class resolution and caching.
At the same time this fix introduces support for specifying a parent ClassLoader for run() and getClassByName() calls so that you can pass an alternative (augmented) classpath to Groovy scripts.