org.codehaus.classworlds

## Class ClassRealmAdapter

- java.lang.Object
- - org.codehaus.classworlds.ClassRealmAdapter

All Implemented Interfaces:
  ClassRealm

    public class ClassRealmAdapter
    extends java.lang.Object
    implements ClassRealm

An adapter for ClassRealms

Version:
  $Id: ClassRealmAdapter.java 7933 2008-12-17 17:33:58Z bentmann $
Author:
  Andrew Williams

### Method Summary

Methods
`void` `addConstituent(java.net.URL constituent)`
`ClassRealm` `createChildRealm(java.lang.String id)`
`void` `display()`
`boolean` `equals(java.lang.Object o)`
`java.util.Enumeration` `findResources(java.lang.String name)`
`java.lang.ClassLoader` `getClassLoader()`
`java.net.URL[]` `getConstituents()`
`java.lang.String` `getId()`
`static ClassRealmAdapter` `getInstance(ClassRealm newRealm)`
`ClassRealm` `getParent()`
`ClassRealm` `getParentRealm()`
`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)`

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

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

### Method Detail

#### getInstance

    public static ClassRealmAdapter getInstance(ClassRealm newRealm)

#### getId

    public java.lang.String getId()

Specified by:
  `getId` in interface `ClassRealm`

#### getWorld

    public ClassWorld getWorld()

Specified by:
  `getWorld` in interface `ClassRealm`

#### importFrom

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

Specified by:
  `importFrom` in interface `ClassRealm`
Throws:
  `NoSuchRealmException`

#### addConstituent

    public void addConstituent(java.net.URL constituent)

Specified by:
  `addConstituent` in interface `ClassRealm`

#### locateSourceRealm

    public ClassRealm locateSourceRealm(java.lang.String className)

Specified by:
  `locateSourceRealm` in interface `ClassRealm`

#### setParent

    public void setParent(ClassRealm classRealm)

Specified by:
  `setParent` in interface `ClassRealm`

#### createChildRealm

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

Specified by:
  `createChildRealm` in interface `ClassRealm`
Throws:
  `DuplicateRealmException`

#### getClassLoader

    public java.lang.ClassLoader getClassLoader()

Specified by:
  `getClassLoader` in interface `ClassRealm`

#### getParent

    public ClassRealm getParent()

Specified by:
  `getParent` in interface `ClassRealm`

#### getParentRealm

    public ClassRealm getParentRealm()

#### getConstituents

    public java.net.URL[] getConstituents()

Specified by:
  `getConstituents` in interface `ClassRealm`

#### loadClass

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

Specified by:
  `loadClass` in interface `ClassRealm`
Throws:
  `java.lang.ClassNotFoundException`

#### getResource

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

Specified by:
  `getResource` in interface `ClassRealm`

#### findResources

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

Specified by:
  `findResources` in interface `ClassRealm`
Throws:
  `java.io.IOException`

#### getResourceAsStream

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

Specified by:
  `getResourceAsStream` in interface `ClassRealm`

#### display

    public void display()

Specified by:
  `display` in interface `ClassRealm`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`