org.codehaus.plexus.classworlds

## Class ClassWorld

- java.lang.Object
- - org.codehaus.plexus.classworlds.ClassWorld

Direct Known Subclasses:
  ClassWorldReverseAdapter

    public class ClassWorld
    extends Object

A collection of `ClassRealm`s, indexed by id.

Author:
  bob mcwhirter

### Constructor Summary

Constructors
Constructor and Description
`ClassWorld()`
`ClassWorld(String realmId, ClassLoader classLoader)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addListener(ClassWorldListener listener)`
`void` `disposeRealm(String id)`
`ClassRealm` `getClassRealm(String id)`
`ClassRealm` `getRealm(String id)`
`Collection<ClassRealm>` `getRealms()`
`ClassRealm` `newRealm(String id)`
`ClassRealm` `newRealm(String id, ClassLoader classLoader)`
`void` `removeListener(ClassWorldListener listener)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ClassWorld

    public ClassWorld(String realmId,
                      ClassLoader classLoader)

#### ClassWorld

    public ClassWorld()

### Method Detail

#### newRealm

    public ClassRealm newRealm(String id)
                        throws DuplicateRealmException

Throws:
  `DuplicateRealmException`

#### newRealm

    public ClassRealm newRealm(String id,
                               ClassLoader classLoader)
                        throws DuplicateRealmException

Throws:
  `DuplicateRealmException`

#### disposeRealm

    public void disposeRealm(String id)
                      throws NoSuchRealmException

Throws:
  `NoSuchRealmException`

#### getRealm

    public ClassRealm getRealm(String id)
                        throws NoSuchRealmException

Throws:
  `NoSuchRealmException`

#### getRealms

    public Collection<ClassRealm> getRealms()

#### getClassRealm

    public ClassRealm getClassRealm(String id)

#### addListener

    public void addListener(ClassWorldListener listener)

#### removeListener

    public void removeListener(ClassWorldListener listener)