public class LaunchedURLClassLoader extends URLClassLoader
ClassLoader used by the Launcher.| 构造器和说明 |
|---|
LaunchedURLClassLoader(URL[] urls,
ClassLoader parent)
Create a new
LaunchedURLClassLoader instance. |
| 限定符和类型 | 方法和说明 |
|---|---|
URL |
findResource(String name) |
Enumeration<URL> |
findResources(String name) |
URL |
getResource(String name)
Gets the resource with the given
name. |
Enumeration<URL> |
getResources(String name)
Gets the resources with the given
name. |
protected Class<?> |
loadClass(String name,
boolean resolve)
Attempt to load classes from the URLs before delegating to the parent loader.
|
addURL, close, definePackage, findClass, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic LaunchedURLClassLoader(URL[] urls, ClassLoader parent)
LaunchedURLClassLoader instance.urls - the URLs from which to load classes and resourcesparent - the parent class loader for delegationpublic URL getResource(String name)
name. Unlike a standard
ClassLoader, this method will first search the root class loader. If the
resource is not found, this method will call findResource(String).getResource 在类中 ClassLoaderpublic URL findResource(String name)
findResource 在类中 URLClassLoaderpublic Enumeration<URL> findResources(String name) throws IOException
findResources 在类中 URLClassLoaderIOExceptionpublic Enumeration<URL> getResources(String name) throws IOException
name. Returns a combination of the
resources found by findResources(String) and from
getResources(String) on the root class
loader, if any.getResources 在类中 ClassLoaderIOExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass 在类中 ClassLoaderClassNotFoundExceptionCopyright © 2023. All rights reserved.