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<?> @Nullable URLfindResource(String name) @Nullable URLgetResource(String name) getResources(String name) booleanisClassReloadable(Class<?> classType) Class<?> Class<?> publicDefineClass(String name, byte[] b, @Nullable ProtectionDomain protectionDomain) Methods inherited from class URLClassLoaderaddURL, close, definePackage, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class SecureClassLoaderdefineClass, defineClassMethods inherited from class 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
- urls- the urls managed by the classloader
- updatedFiles- any files that have been updated since the JARs referenced in URLs were created.
 
 
- 
- 
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
 
- 
publicDefineClasspublic Class<?> publicDefineClass(String name, byte[] b, @Nullable ProtectionDomain protectionDomain) - Specified by:
- publicDefineClassin interface- SmartClassLoader
 
- 
getOriginalClassLoader- Specified by:
- getOriginalClassLoaderin interface- SmartClassLoader
 
- 
isClassReloadable- Specified by:
- isClassReloadablein interface- SmartClassLoader
 
 
-