com.opensymphony.xwork2.util.classloader

## Class ReloadingClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - com.opensymphony.xwork2.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 and Description
    `ReloadingClassLoader(ClassLoader pParent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setSigners`

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

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

- - ### Constructor Detail

    - #### ReloadingClassLoader

          public ReloadingClassLoader(ClassLoader pParent)

  - ### Method Detail

    - #### 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)

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