org.apache.struts2.compiler

## Class MemoryClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - org.apache.struts2.compiler.MemoryClassLoader

-     public class MemoryClassLoader
      extends ClassLoader

  Keeps a cache of class name -> MemoryJavaFileObject. If the requested class name is in the cache a new class is defined for it, otherwise findClass delegates to the parent class loader

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryClassLoader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMemoryJavaFileObject(String jsp, MemoryJavaFileObject memoryJavaFileObject)`
    `protected Class<?>` | `findClass(String name)`

    - ### Methods inherited from class java.lang.ClassLoader

      `clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MemoryClassLoader

          public MemoryClassLoader()

  - ### Method Detail

    - #### findClass

          protected Class<?> findClass(String name)
                                throws ClassNotFoundException

      Overrides:
        `findClass` in class `ClassLoader`
      Throws:
        `ClassNotFoundException`

    - #### addMemoryJavaFileObject

          public void addMemoryJavaFileObject(String jsp,
                                              MemoryJavaFileObject memoryJavaFileObject)

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.