Package org.apache.struts2.util.classloader

# Class ReloadingClassLoader

java.lang.Object
java.lang.ClassLoader
org.apache.struts2.util.classloader.ReloadingClassLoader

public class ReloadingClassLoader extends ClassLoader

The ReloadingClassLoader uses a delegation mechanism to allow classes to be reloaded. That means that loadClass calls may return different results if the class was changed in the underlying ResourceStore.

class taken from Apache JCI

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReloadingClassLoader(ClassLoader pParent)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `addResourceStore(ResourceStore pStore)`
  `void`
  `clearAssertionStatus()`
  `URL`
  `getResource(String name)`
  `InputStream`
  `getResourceAsStream(String name)`
  `protected boolean`
  `isAccepted(String className)`
  `Class`
  `loadClass(String name)`
  `void`
  `reload()`
  `boolean`
  `removeResourceStore(ResourceStore pStore)`
  `void`
  `setAccepClasses(Set<Pattern> acceptClasses)`
  `void`
  `setClassAssertionStatus(String className, boolean enabled)`
  `void`
  `setDefaultAssertionStatus(boolean enabled)`
  `void`
  `setPackageAssertionStatus(String packageName, boolean enabled)`

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

  `defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setSigners`

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

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

- ## Constructor Details

  - ### ReloadingClassLoader

    public ReloadingClassLoader(ClassLoader pParent)

- ## Method Details

  - ### addResourceStore

    public boolean addResourceStore(ResourceStore pStore)

  - ### removeResourceStore

    public boolean removeResourceStore(ResourceStore pStore)

  - ### reload

    public void reload()

  - ### clearAssertionStatus

    public void clearAssertionStatus()
    Overrides:
      `clearAssertionStatus` in class `ClassLoader`

  - ### getResource

    public URL getResource(String name)
    Overrides:
      `getResource` in class `ClassLoader`

  - ### getResourceAsStream

    public InputStream getResourceAsStream(String name)
    Overrides:
      `getResourceAsStream` in class `ClassLoader`

  - ### loadClass

    public Class loadClass(String name) throws ClassNotFoundException
    Overrides:
      `loadClass` in class `ClassLoader`
    Throws:
      `ClassNotFoundException`

  - ### setClassAssertionStatus

    public void setClassAssertionStatus(String className, boolean enabled)
    Overrides:
      `setClassAssertionStatus` in class `ClassLoader`

  - ### setDefaultAssertionStatus

    public void setDefaultAssertionStatus(boolean enabled)
    Overrides:
      `setDefaultAssertionStatus` in class `ClassLoader`

  - ### setPackageAssertionStatus

    public void setPackageAssertionStatus(String packageName, boolean enabled)
    Overrides:
      `setPackageAssertionStatus` in class `ClassLoader`

  - ### setAccepClasses

    public void setAccepClasses(Set<Pattern> acceptClasses)

  - ### isAccepted

    protected boolean isAccepted(String className)