Class BytecodeGroovyClassLoader

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class BytecodeGroovyClassLoader
    extends groovy.lang.GroovyClassLoader
    Groovy does not cache the bytecode sequences for generated classes. BytecodeReadingParanamer needs these to get paramater names from classes The Groovy compiler does create the debug tables, and they are the same as the ones made for a native Java class, so this derived GroovyClassLoader fills in for the missing functionality from the base GroovyClassLoader.

    Groovy allows a mechanism via a system property to force the dump of bytecode to a (temp) directory, but caching the bytecode avoids having to clean up temp directories after the run.

    • Constructor Detail

      • BytecodeGroovyClassLoader

        public BytecodeGroovyClassLoader()
    • Method Detail

      • createCollector

        protected groovy.lang.GroovyClassLoader.ClassCollector createCollector​(org.codehaus.groovy.control.CompilationUnit unit,
                                                                               org.codehaus.groovy.control.SourceUnit su)
        Overrides:
        createCollector in class groovy.lang.GroovyClassLoader