public class UberJarRealmClassLoader extends RealmClassLoader
ClassRealms.
Loads classes from an "uberjar".| Modifier and Type | Field and Description |
|---|---|
private java.util.Map |
classIndex |
private java.util.Map |
jarIndexes |
private java.util.List |
urls |
realm| Constructor and Description |
|---|
UberJarRealmClassLoader(DefaultClassRealm realm) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstituent(java.net.URL constituent)
Add a constituent to this realm for locating classes.
|
private void |
buildIndexForJar(java.net.URL inUrl) |
protected byte[] |
findClassInDirectoryUrl(java.net.URL url,
java.lang.String path) |
protected byte[] |
findClassInJarStream(java.net.URL inUrl,
java.lang.String path) |
java.net.URL |
findResource(java.lang.String name)
Find a resource within this ClassLoader only (don't delegate to the parent).
|
protected java.net.URL |
findResourceInDirectoryUrl(java.net.URL inUrl,
java.lang.String path) |
protected java.net.URL |
findResourceInJarStream(java.net.URL inUrl,
java.lang.String path) |
java.util.Enumeration |
findResourcesDirect(java.lang.String name)
Find resources from this ClassLoader, and don't search the realm.
|
java.lang.Class |
loadClassDirect(java.lang.String className)
Load a class directly from this classloader without
defering through any other
ClassRealm. |
private byte[] |
readStream(java.io.InputStream in) |
findResources, getBytesToEndOfStream, getRealm, getResource, getResourceDirect, getURLs, loadClassaddURL, close, definePackage, findClass, getPermissions, getResourceAsStream, newInstance, newInstanceclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprivate java.util.Map classIndex
private java.util.List urls
private java.util.Map jarIndexes
public UberJarRealmClassLoader(DefaultClassRealm realm)
public void addConstituent(java.net.URL constituent)
RealmClassLoaderaddConstituent in class RealmClassLoaderconstituent - URL to contituent jar or directory.private void buildIndexForJar(java.net.URL inUrl)
public java.lang.Class loadClassDirect(java.lang.String className)
throws java.lang.ClassNotFoundException
ClassRealm.loadClassDirect in class RealmClassLoaderclassName - The name of the class to load.java.lang.ClassNotFoundException - If the class could not be found.public java.net.URL findResource(java.lang.String name)
RealmClassLoaderfindResource in class RealmClassLoaderpublic java.util.Enumeration findResourcesDirect(java.lang.String name)
RealmClassLoaderfindResourcesDirect in class RealmClassLoaderprotected java.net.URL findResourceInJarStream(java.net.URL inUrl,
java.lang.String path)
protected java.net.URL findResourceInDirectoryUrl(java.net.URL inUrl,
java.lang.String path)
protected byte[] findClassInJarStream(java.net.URL inUrl,
java.lang.String path)
protected byte[] findClassInDirectoryUrl(java.net.URL url,
java.lang.String path)
private byte[] readStream(java.io.InputStream in)
throws java.io.IOException
java.io.IOException