Class RestartClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.springframework.boot.devtools.restart.classloader.RestartClassLoader
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- SmartClassLoader
Disposable 
ClassLoader used to support application restarting. Provides parent
 last loading for the specified URLs.- Since:
- 1.3.0
- Author:
- Andy Clement, Phillip Webb
- 
Constructor SummaryConstructorsConstructorDescriptionRestartClassLoader(ClassLoader parent, URL[] urls) Create a newRestartClassLoaderinstance.RestartClassLoader(ClassLoader parent, URL[] urls, ClassLoaderFileRepository updatedFiles) Create a newRestartClassLoaderinstance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected Class<?>findResource(String name) getResource(String name) getResources(String name) booleanisClassReloadable(Class<?> classType) Class<?>Class<?>publicDefineClass(String name, byte[] b, ProtectionDomain protectionDomain) Methods inherited from class java.net.URLClassLoaderaddURL, close, definePackage, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoaderdefineClass, defineClassMethods inherited from class java.lang.ClassLoaderclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
- 
Constructor Details- 
RestartClassLoaderCreate a newRestartClassLoaderinstance.- Parameters:
- parent- the parent classloader
- urls- the urls managed by the classloader
 
- 
RestartClassLoaderCreate a newRestartClassLoaderinstance.- Parameters:
- parent- the parent classloader
- updatedFiles- any files that have been updated since the JARs referenced in URLs were created.
- urls- the urls managed by the classloader
 
 
- 
- 
Method Details- 
getResources- Overrides:
- getResourcesin class- ClassLoader
- Throws:
- IOException
 
- 
getResource- Overrides:
- getResourcein class- ClassLoader
 
- 
findResource- Overrides:
- findResourcein class- URLClassLoader
 
- 
loadClass- Overrides:
- loadClassin class- ClassLoader
- Throws:
- ClassNotFoundException
 
- 
findClass- Overrides:
- findClassin class- URLClassLoader
- Throws:
- ClassNotFoundException
 
- 
publicDefineClass- Specified by:
- publicDefineClassin interface- SmartClassLoader
 
- 
getOriginalClassLoader- Specified by:
- getOriginalClassLoaderin interface- SmartClassLoader
 
- 
isClassReloadable- Specified by:
- isClassReloadablein interface- SmartClassLoader
 
 
-