java.io.Closeable, java.lang.AutoCloseablepublic class LaunchedURLClassLoader
extends java.net.URLClassLoader
ClassLoader used by the Launcher.| Constructor | Description |
|---|---|
LaunchedURLClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent) |
Create a new
LaunchedURLClassLoader instance. |
| Modifier and Type | Method | Description |
|---|---|---|
java.net.URL |
findResource(java.lang.String name) |
|
java.util.Enumeration<java.net.URL> |
findResources(java.lang.String name) |
|
java.net.URL |
getResource(java.lang.String name) |
Gets the resource with the given
name. |
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name) |
Gets the resources with the given
name. |
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean resolve) |
Attempt to load classes from the URLs before delegating to the parent loader.
|
clearAssertionStatus, 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, setSignerspublic LaunchedURLClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
LaunchedURLClassLoader instance.urls - the URLs from which to load classes and resourcesparent - the parent class loader for delegationpublic java.net.URL getResource(java.lang.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 in class java.lang.ClassLoaderpublic java.net.URL findResource(java.lang.String name)
findResource in class java.net.URLClassLoaderpublic java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
throws java.io.IOException
findResources in class java.net.URLClassLoaderjava.io.IOExceptionpublic java.util.Enumeration<java.net.URL> getResources(java.lang.String name)
throws java.io.IOException
name. Returns a combination of the
resources found by findResources(String) and from
getResources(String) on the root class
loader, if any.getResources in class java.lang.ClassLoaderjava.io.IOExceptionprotected java.lang.Class<?> loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
loadClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionCopyright © 2018. All rights reserved.