Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1187

Allow loading of groovy classes from GroovyScriptEngine, leveraging the reloading and caching support.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-5
    • 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.

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            marc@anyware.co.uk Marc Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: