org.codehaus.classworlds
Class ClassWorld

java.lang.Object
  extended byorg.codehaus.classworlds.ClassWorld

public class ClassWorld
extends java.lang.Object

A collection of ClassRealms, indexed by id.

Version:
$Id: ClassWorld.java,v 1.5 2004/03/25 15:27:47 dandiep Exp $
Author:
bob mcwhirter

Constructor Summary
ClassWorld()
          Construct.
 
Method Summary
 void disposeRealm(java.lang.String id)
           
 ClassRealm getRealm(java.lang.String id)
          Retrieve a ClassRealm by its id.
 java.util.Collection getRealms()
          Retrieve the collection of all ClassRealms in this world.
 ClassRealm newRealm(java.lang.String id)
          Create a new ClassRealm.
 ClassRealm newRealm(java.lang.String id, java.lang.ClassLoader classLoader)
          Create a new ClassRealm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassWorld

public ClassWorld()
Construct.

Method Detail

disposeRealm

public void disposeRealm(java.lang.String id)
                  throws NoSuchRealmException
Throws:
NoSuchRealmException

getRealm

public ClassRealm getRealm(java.lang.String id)
                    throws NoSuchRealmException
Retrieve a ClassRealm by its id.

Parameters:
id - The id.
Returns:
The matching class-realm.
Throws:
NoSuchRealmException - If the id does not correspond to any known class-realm.

getRealms

public java.util.Collection getRealms()
Retrieve the collection of all ClassRealms in this world.

Returns:
The collectio of class-realms.

newRealm

public ClassRealm newRealm(java.lang.String id)
                    throws DuplicateRealmException
Create a new ClassRealm.

Parameters:
id - The realm id.
Returns:
The newly created realm.
Throws:
DuplicateRealmException - If this class-world already contains a realm with the specified id.

newRealm

public ClassRealm newRealm(java.lang.String id,
                           java.lang.ClassLoader classLoader)
                    throws DuplicateRealmException
Create a new ClassRealm.

Parameters:
id - The realm id.
Returns:
The newly created realm.
Throws:
DuplicateRealmException - If this class-world already contains a realm with the specified id.


Copyright © 2001-2004 Apache Software Foundation. Documenation generated September 2 2004.