org.codehaus.classworlds

Class UberJarRealmClassLoader


public class UberJarRealmClassLoader
extends org.codehaus.classworlds.RealmClassLoader

Classloader for ClassRealms.

Loads classes from an "uberjar".

Version:
$Id: UberJarRealmClassLoader.java 126 2006-01-12 04:17:51Z $
Author:
bob mcwhirter

Field Summary

Fields inherited from class org.codehaus.classworlds.RealmClassLoader

realm

Constructor Summary

UberJarRealmClassLoader(DefaultClassRealm realm)

Method Summary

void
addConstituent(URL constituent)
protected byte[]
findClassInDirectoryUrl(URL url, String path)
protected byte[]
findClassInJarStream(URL inUrl, String path)
URL
findResource(String name)
protected URL
findResourceInDirectoryUrl(URL inUrl, String path)
protected URL
findResourceInJarStream(URL inUrl, String path)
Enumeration
findResourcesDirect(String name)
Class
loadClassDirect(String className)
Load a class directly from this classloader without defering through any other ClassRealm.

Methods inherited from class org.codehaus.classworlds.RealmClassLoader

findResource, findResources, findResourcesDirect, getBytesToEndOfStream, getResource, getResourceDirect, getURLs, loadClass

Constructor Details

UberJarRealmClassLoader

public UberJarRealmClassLoader(DefaultClassRealm realm)

Method Details

addConstituent

public void addConstituent(URL constituent)

findClassInDirectoryUrl

protected byte[] findClassInDirectoryUrl(URL url,
                                         String path)

findClassInJarStream

protected byte[] findClassInJarStream(URL inUrl,
                                      String path)

findResource

public URL findResource(String name)
Overrides:
findResource in interface org.codehaus.classworlds.RealmClassLoader

findResourceInDirectoryUrl

protected URL findResourceInDirectoryUrl(URL inUrl,
                                         String path)

findResourceInJarStream

protected URL findResourceInJarStream(URL inUrl,
                                      String path)

findResourcesDirect

public Enumeration findResourcesDirect(String name)
Overrides:
findResourcesDirect in interface org.codehaus.classworlds.RealmClassLoader

loadClassDirect

public Class loadClassDirect(String className)
            throws ClassNotFoundException
Load a class directly from this classloader without defering through any other ClassRealm.
Parameters:
className - The name of the class to load.
Returns:
The loaded class.