Class ExtendedGroovyClassLoader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ExtendedGroovyClassLoader
    extends groovy.lang.GroovyClassLoader
    Extension of the GroovyClassLoader with support for obtaining '.class' files as resources.
    Since:
    2022.1.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  ExtendedGroovyClassLoader.ExtendedClassCollector
      Inner collector class used to track as classes are added.
      • Nested classes/interfaces inherited from class groovy.lang.GroovyClassLoader

        groovy.lang.GroovyClassLoader.ClassCollector, groovy.lang.GroovyClassLoader.InnerLoader
    • Field Summary

      • Fields inherited from class groovy.lang.GroovyClassLoader

        classCache, sourceCache
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      groovy.lang.GroovyClassLoader.ClassCollector createCollector​(org.codehaus.groovy.control.CompilationUnit unit, org.codehaus.groovy.control.SourceUnit su)  
      protected java.lang.Class<?> findClass​(java.lang.String name)  
      org.codehaus.groovy.control.CompilerConfiguration getConfiguration()  
      java.io.InputStream getResourceAsStream​(java.lang.String name)  
      • Methods inherited from class groovy.lang.GroovyClassLoader

        addClasspath, addURL, clearCache, close, createCompilationUnit, defineClass, defineClass, generateScriptName, getClassCacheEntry, getClassPath, getLoadedClasses, getPermissions, getResourceLoader, getTimeStamp, hasCompatibleConfiguration, isRecompilable, isShouldRecompile, isSourceNewer, loadClass, loadClass, loadClass, loadClass, parseClass, parseClass, parseClass, parseClass, parseClass, parseClass, parseClass, recompile, removeClassCacheEntry, setClassCacheEntry, setResourceLoader, setShouldRecompile
      • Methods inherited from class java.net.URLClassLoader

        definePackage, findResource, findResources, getURLs, newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

        defineClass, defineClass
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • findClass

        protected java.lang.Class<?> findClass​(java.lang.String name)
                                        throws java.lang.ClassNotFoundException
        Overrides:
        findClass in class java.net.URLClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • getResourceAsStream

        public java.io.InputStream getResourceAsStream​(java.lang.String name)
        Overrides:
        getResourceAsStream in class java.net.URLClassLoader
      • createCollector

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

        public org.codehaus.groovy.control.CompilerConfiguration getConfiguration()