Class ReloadingClassLoader
java.lang.Object
java.lang.ClassLoader
org.apache.struts2.util.classloader.ReloadingClassLoader
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addResourceStore
(ResourceStore pStore) void
getResource
(String name) getResourceAsStream
(String name) protected boolean
isAccepted
(String className) 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
-
Constructor Details
-
ReloadingClassLoader
-
-
Method Details
-
addResourceStore
-
removeResourceStore
-
reload
public void reload() -
clearAssertionStatus
public void clearAssertionStatus()- Overrides:
clearAssertionStatus
in classClassLoader
-
getResource
- Overrides:
getResource
in classClassLoader
-
getResourceAsStream
- Overrides:
getResourceAsStream
in classClassLoader
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
setClassAssertionStatus
- Overrides:
setClassAssertionStatus
in classClassLoader
-
setDefaultAssertionStatus
public void setDefaultAssertionStatus(boolean enabled) - Overrides:
setDefaultAssertionStatus
in classClassLoader
-
setPackageAssertionStatus
- Overrides:
setPackageAssertionStatus
in classClassLoader
-
setAccepClasses
-
isAccepted
-