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, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public 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 URLClassLoader
url
- the URL to addprotected Class findClass(String name) throws ClassNotFoundException
findClass
in class URLClassLoader
name
- the name of the classClassNotFoundException
- if the class could not be foundpublic URL findResource(String name)
findResource
in class URLClassLoader
name
- 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 URLClassLoader
name
- the resource nameEnumeration
of URL
sIOException
- 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 ClassLoader
libname
- the library nameSystem.loadLibrary(String)
,
System.mapLibraryName(String)
elasticsearch-river-jdbc