Package: org.apache.groovy.groovysh.jline

## [Java] Class GroovyEngine.EngineClassLoader

- org.apache.groovy.groovysh.jline.GroovyEngine.EngineClassLoader

-     public static class GroovyEngine.EngineClassLoader
      extends GroovyClassLoader

  Custom class loader for dynamically loaded Groovy classes. Extends GroovyClassLoader with cache purging capabilities.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class GroovyClassLoader` | `classCache, sourceCache`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `EngineClassLoader()` Constructs a new EngineClassLoader.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Package[]` | `getPackages()` Returns all packages loaded by this class loader.
    `` | `public void` | `purgeClassCache(String regex)` Purges cached classes matching the given regex pattern.
    `` | `public void` | `purgeClassCache()` Purges all dynamically generated script classes from the cache.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyClassLoader` | `addClasspath, addURL, clearCache, close, createCollector, createCompilationUnit, defineClass, defineClass, genEncodingString, generateScriptName, getClassCacheEntry, getClassPath, getLoadedClasses, getPermissions, getResourceLoader, getTimeStamp, hasCompatibleConfiguration, isRecompilable, isShouldRecompile, isSourceNewer, loadClass, loadClass, loadClass, loadClass, parseClass, parseClass, parseClass, parseClass, parseClass, parseClass, recompile, removeClassCacheEntry, setClassCacheEntry, setResourceLoader, setShouldRecompile`

- - ### Constructor Detail

    - #### public EngineClassLoader()

      Constructs a new EngineClassLoader.

  - ### Method Detail

    - #### public Package[] getPackages()

      Returns all packages loaded by this class loader.

      Returns:
        array of packages

    - #### public void purgeClassCache(String regex)

      Purges cached classes matching the given regex pattern.

      Parameters:
        `regex` - the pattern to match class names

    - #### public void purgeClassCache()

      Purges all dynamically generated script classes from the cache.