Package org.codehaus.plexus.classworlds

## Class ClassWorld

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

Direct Known Subclasses:
  `ClassWorldReverseAdapter`

    public class ClassWorld
    extends java.lang.Object

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

Author:
  bob mcwhirter

### Constructor Summary

Constructors
`ClassWorld()`
`ClassWorld​(java.lang.String realmId, java.lang.ClassLoader classLoader)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addListener​(ClassWorldListener listener)`
`void` `disposeRealm​(java.lang.String id)`
`ClassRealm` `getClassRealm​(java.lang.String id)`
`ClassRealm` `getRealm​(java.lang.String id)`
`java.util.Collection<ClassRealm>` `getRealms()`
`ClassRealm` `newRealm​(java.lang.String id)`
`ClassRealm` `newRealm​(java.lang.String id, java.lang.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​(java.lang.String realmId,
                      java.lang.ClassLoader classLoader)

#### ClassWorld

    public ClassWorld()

### Method Detail

#### newRealm

    public ClassRealm newRealm​(java.lang.String id)
                        throws DuplicateRealmException

Throws:
  `DuplicateRealmException`

#### newRealm

    public ClassRealm newRealm​(java.lang.String id,
                               java.lang.ClassLoader classLoader)
                        throws DuplicateRealmException

Throws:
  `DuplicateRealmException`

#### disposeRealm

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

Throws:
  `NoSuchRealmException`

#### getRealm

    public ClassRealm getRealm​(java.lang.String id)
                        throws NoSuchRealmException

Throws:
  `NoSuchRealmException`

#### getRealms

    public java.util.Collection<ClassRealm> getRealms()

#### getClassRealm

    public ClassRealm getClassRealm​(java.lang.String id)

#### addListener

    public void addListener​(ClassWorldListener listener)

#### removeListener

    public void removeListener​(ClassWorldListener listener)