Package org.codehaus.classworlds

## Class DefaultClassRealm

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

All Implemented Interfaces:
  `ClassRealm`

    @Deprecated
    public class DefaultClassRealm
    extends java.lang.Object
    implements ClassRealm

Deprecated.

### Constructor Summary

Constructors
`DefaultClassRealm​(ClassWorld world, java.lang.String id)` Deprecated.
`DefaultClassRealm​(ClassWorld world, java.lang.String id, java.lang.ClassLoader foreignClassLoader)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addConstituent​(java.lang.String constituent, byte[] b)` Deprecated. Adds a byte[] class definition as a constituent for locating classes.
`void` `addConstituent​(java.net.URL constituent)` Deprecated.
`ClassRealm` `createChildRealm​(java.lang.String id)` Deprecated.
`void` `display()` Deprecated.
`java.util.Enumeration` `findResources​(java.lang.String name)` Deprecated.
`java.lang.ClassLoader` `getClassLoader()` Deprecated.
`java.net.URL[]` `getConstituents()` Deprecated.
`java.lang.String` `getId()` Deprecated.
`ClassRealm` `getParent()` Deprecated.
`java.net.URL` `getResource​(java.lang.String name)` Deprecated.
`java.io.InputStream` `getResourceAsStream​(java.lang.String name)` Deprecated.
`ClassWorld` `getWorld()` Deprecated.
`void` `importFrom​(java.lang.String realmId, java.lang.String packageName)` Deprecated.
`java.lang.Class` `loadClass​(java.lang.String name)` Deprecated.
`ClassRealm` `locateSourceRealm​(java.lang.String classname)` Deprecated.
`void` `setParent​(ClassRealm parent)` Deprecated.

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

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

### Constructor Detail

#### DefaultClassRealm

    public DefaultClassRealm​(ClassWorld world,
                             java.lang.String id)

Deprecated.

#### DefaultClassRealm

    public DefaultClassRealm​(ClassWorld world,
                             java.lang.String id,
                             java.lang.ClassLoader foreignClassLoader)

Deprecated.

### Method Detail

#### getConstituents

    public java.net.URL[] getConstituents()

Deprecated.

Specified by:
  `getConstituents` in interface `ClassRealm`

#### getParent

    public ClassRealm getParent()

Deprecated.

Specified by:
  `getParent` in interface `ClassRealm`

#### setParent

    public void setParent​(ClassRealm parent)

Deprecated.

Specified by:
  `setParent` in interface `ClassRealm`

#### getId

    public java.lang.String getId()

Deprecated.

Specified by:
  `getId` in interface `ClassRealm`

#### getWorld

    public ClassWorld getWorld()

Deprecated.

Specified by:
  `getWorld` in interface `ClassRealm`

#### importFrom

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

Deprecated.

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

#### addConstituent

    public void addConstituent​(java.net.URL constituent)

Deprecated.

Specified by:
  `addConstituent` in interface `ClassRealm`

#### addConstituent

    public void addConstituent​(java.lang.String constituent,
                               byte[] b)
                        throws java.lang.ClassNotFoundException

Deprecated.
Adds a byte[] class definition as a constituent for locating classes. Currently uses BytesURLStreamHandler to hold a reference of the byte[] in memory. This ensures we have a unifed URL resource model for all constituents. The code to cache to disk is commented out - maybe a property to choose which method?

Parameters:
  `constituent` - class name
  `b` - the class definition as a byte[]
Throws:
  `java.lang.ClassNotFoundException` - when class couldn't be loaded

#### locateSourceRealm

    public ClassRealm locateSourceRealm​(java.lang.String classname)

Deprecated.

Specified by:
  `locateSourceRealm` in interface `ClassRealm`

#### getClassLoader

    public java.lang.ClassLoader getClassLoader()

Deprecated.

Specified by:
  `getClassLoader` in interface `ClassRealm`

#### createChildRealm

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

Deprecated.

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

#### loadClass

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

Deprecated.

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

#### getResource

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

Deprecated.

Specified by:
  `getResource` in interface `ClassRealm`

#### getResourceAsStream

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

Deprecated.

Specified by:
  `getResourceAsStream` in interface `ClassRealm`

#### findResources

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

Deprecated.

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

#### display

    public void display()

Deprecated.

Specified by:
  `display` in interface `ClassRealm`