org.codehaus.classworlds

## Interface ClassRealm

All Known Implementing Classes:
  ClassRealmAdapter, DefaultClassRealm

    public interface ClassRealm

Autonomous sub-portion of a `ClassWorld`.

This class most closed maps to the `ClassLoader` role from Java and in facts can provide a `ClassLoader` view of itself using `getClassLoader()`.

Version:
  $Id: ClassRealm.java 7933 2008-12-17 17:33:58Z bentmann $
Author:
  bob mcwhirter, Jason van Zyl

### Method Summary

Methods
`void` `addConstituent(java.net.URL constituent)`
`ClassRealm` `createChildRealm(java.lang.String id)`
`void` `display()`
`java.util.Enumeration` `findResources(java.lang.String name)`
`java.lang.ClassLoader` `getClassLoader()`
`java.net.URL[]` `getConstituents()`
`java.lang.String` `getId()`
`ClassRealm` `getParent()`
`java.net.URL` `getResource(java.lang.String name)`
`java.io.InputStream` `getResourceAsStream(java.lang.String name)`
`ClassWorld` `getWorld()`
`void` `importFrom(java.lang.String realmId, java.lang.String pkgName)`
`java.lang.Class` `loadClass(java.lang.String name)`
`ClassRealm` `locateSourceRealm(java.lang.String className)`
`void` `setParent(ClassRealm classRealm)`

### Method Detail

#### getId

    java.lang.String getId()

#### getWorld

    ClassWorld getWorld()

#### importFrom

    void importFrom(java.lang.String realmId,
                  java.lang.String pkgName)
                    throws NoSuchRealmException

Throws:
  `NoSuchRealmException`

#### addConstituent

    void addConstituent(java.net.URL constituent)

#### locateSourceRealm

    ClassRealm locateSourceRealm(java.lang.String className)

#### setParent

    void setParent(ClassRealm classRealm)

#### createChildRealm

    ClassRealm createChildRealm(java.lang.String id)
                                throws DuplicateRealmException

Throws:
  `DuplicateRealmException`

#### getClassLoader

    java.lang.ClassLoader getClassLoader()

#### getParent

    ClassRealm getParent()

#### getConstituents

    java.net.URL[] getConstituents()

#### loadClass

    java.lang.Class loadClass(java.lang.String name)
                              throws java.lang.ClassNotFoundException

Throws:
  `java.lang.ClassNotFoundException`

#### getResource

    java.net.URL getResource(java.lang.String name)

#### findResources

    java.util.Enumeration findResources(java.lang.String name)
                                        throws java.io.IOException

Throws:
  `java.io.IOException`

#### getResourceAsStream

    java.io.InputStream getResourceAsStream(java.lang.String name)

#### display

    void display()