Class LaunchedClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader
org.springframework.boot.loader.launch.LaunchedClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
ClassLoader
used by the Launcher
.- Since:
- 3.2.0
- Author:
- Phillip Webb, Dave Syer, Andy Wilkinson
-
Constructor Summary
ConstructorDescriptionLaunchedClassLoader
(boolean exploded, URL[] urls, ClassLoader parent) Create a newLaunchedClassLoader
instance.LaunchedClassLoader
(boolean exploded, Archive rootArchive, URL[] urls, ClassLoader parent) Create a newLaunchedClassLoader
instance. -
Method Summary
Methods inherited from class org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader
clearCache, close, definePackageIfNecessary, findResource, findResources
Methods inherited from class java.net.URLClassLoader
addURL, findClass, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
LaunchedClassLoader
Create a newLaunchedClassLoader
instance.- Parameters:
exploded
- if the underlying archive is explodedurls
- the URLs from which to load classes and resourcesparent
- the parent class loader for delegation
-
LaunchedClassLoader
Create a newLaunchedClassLoader
instance.- Parameters:
exploded
- if the underlying archive is explodedrootArchive
- the root archive ornull
urls
- the URLs from which to load classes and resourcesparent
- the parent class loader for delegation
-
-
Method Details
-
loadClass
- Overrides:
loadClass
in classJarUrlClassLoader
- Throws:
ClassNotFoundException
-
definePackage
- Overrides:
definePackage
in classURLClassLoader
- Throws:
IllegalArgumentException
-
definePackage
protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException - Overrides:
definePackage
in classClassLoader
- Throws:
IllegalArgumentException
-