public final class URIClassLoader extends URLClassLoader
| Constructor and Description |
|---|
URIClassLoader()
Creates URIClassLoader
|
URIClassLoader(ClassLoader parent)
Creates URIClassLoader with the specified parent class loader.
|
| Modifier and Type | Method and Description |
|---|---|
URIClassLoader |
addURI(URI uri)
Add specified URI at the end of the search path.
|
protected void |
addURL(URL url)
Deprecated.
use addURI
|
protected Class |
findClass(String name)
Finds and loads the class with the specified name.
|
protected String |
findLibrary(String libname)
Returns the absolute path name of a native library.
|
URL |
findResource(String name)
Finds the resource with the specified name.
|
Enumeration<URL> |
findResources(String name)
Returns an Enumeration of URLs representing all of the resources having
the specified name.
|
URI[] |
getURIs() |
String |
toString() |
close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic URIClassLoader()
public URIClassLoader(ClassLoader parent)
parent - the parent class loader.public URIClassLoader addURI(URI uri)
uri - the URI to add@Deprecated protected void addURL(URL url)
addURL in class URLClassLoaderurl - the URL to addprotected Class findClass(String name) throws ClassNotFoundException
findClass in class URLClassLoadername - the name of the classClassNotFoundException - if the class could not be foundpublic URL findResource(String name)
findResource in class URLClassLoadername - the name of the resourceURL for the resource, or null if the
resource could not be found.public Enumeration<URL> findResources(String name) throws IOException
findResources in class URLClassLoadername - the resource nameEnumeration of URLsIOException - if an I/O exception occursprotected String findLibrary(String libname)
null, the VM searches the library along the path specified
as the
java.library.path property. This method invoke
getLibraryHandle(java.lang.String) method to find handle of this library. If the
handle is found and its URL protocol is "file", the system-dependent
absolute library file path is returned. Otherwise this method returns
null. Subclasses can override this method to provide specific approaches in library searching.
findLibrary in class ClassLoaderlibname - the library nameSystem.loadLibrary(String),
System.mapLibraryName(String)elasticsearch-river-jdbc