Package org.springframework.boot.loader
Class LaunchedURLClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.springframework.boot.loader.LaunchedURLClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
ClassLoader
used by the Launcher
.- Since:
- 1.0.0
- Author:
- Phillip Webb, Dave Syer, Andy Wilkinson
-
Constructor Summary
ConstructorDescriptionLaunchedURLClassLoader
(boolean exploded, URL[] urls, ClassLoader parent) Create a newLaunchedURLClassLoader
instance.LaunchedURLClassLoader
(boolean exploded, Archive rootArchive, URL[] urls, ClassLoader parent) Create a newLaunchedURLClassLoader
instance.LaunchedURLClassLoader
(URL[] urls, ClassLoader parent) Create a newLaunchedURLClassLoader
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear URL caches.protected Package
definePackage
(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) protected Package
definePackage
(String name, Manifest man, URL url) findResource
(String name) findResources
(String name) protected Class<?>
Methods inherited from class java.net.URLClassLoader
addURL, close, 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
-
LaunchedURLClassLoader
Create a newLaunchedURLClassLoader
instance.- Parameters:
urls
- the URLs from which to load classes and resourcesparent
- the parent class loader for delegation
-
LaunchedURLClassLoader
Create a newLaunchedURLClassLoader
instance.- Parameters:
exploded
- if the underlying archive is explodedurls
- the URLs from which to load classes and resourcesparent
- the parent class loader for delegation
-
LaunchedURLClassLoader
public LaunchedURLClassLoader(boolean exploded, Archive rootArchive, URL[] urls, ClassLoader parent) Create a newLaunchedURLClassLoader
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- Since:
- 2.3.1
-
-
Method Details
-
findResource
- Overrides:
findResource
in classURLClassLoader
-
findResources
- Overrides:
findResources
in classURLClassLoader
- Throws:
IOException
-
loadClass
- Overrides:
loadClass
in classClassLoader
- 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
-
clearCache
public void clearCache()Clear URL caches.
-