Package org.codehaus.classworlds
Class DefaultClassRealm
- java.lang.Object
-
- org.codehaus.classworlds.DefaultClassRealm
-
- All Implemented Interfaces:
ClassRealm
@Deprecated public class DefaultClassRealm extends Object implements ClassRealm
Deprecated.
-
-
Constructor Summary
Constructors Constructor Description DefaultClassRealm(ClassWorld world, String id)
Deprecated.DefaultClassRealm(ClassWorld world, String id, ClassLoader foreignClassLoader)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addConstituent(String constituent, byte[] b)
Deprecated.Adds a byte[] class definition as a constituent for locating classes.void
addConstituent(URL constituent)
Deprecated.ClassRealm
createChildRealm(String id)
Deprecated.void
display()
Deprecated.Enumeration
findResources(String name)
Deprecated.ClassLoader
getClassLoader()
Deprecated.URL[]
getConstituents()
Deprecated.String
getId()
Deprecated.ClassRealm
getParent()
Deprecated.URL
getResource(String name)
Deprecated.InputStream
getResourceAsStream(String name)
Deprecated.ClassWorld
getWorld()
Deprecated.void
importFrom(String realmId, String packageName)
Deprecated.Class
loadClass(String name)
Deprecated.ClassRealm
locateSourceRealm(String classname)
Deprecated.void
setParent(ClassRealm parent)
Deprecated.
-
-
-
Constructor Detail
-
DefaultClassRealm
public DefaultClassRealm(ClassWorld world, String id)
Deprecated.
-
DefaultClassRealm
public DefaultClassRealm(ClassWorld world, String id, ClassLoader foreignClassLoader)
Deprecated.
-
-
Method Detail
-
getConstituents
public URL[] getConstituents()
Deprecated.- Specified by:
getConstituents
in interfaceClassRealm
-
getParent
public ClassRealm getParent()
Deprecated.- Specified by:
getParent
in interfaceClassRealm
-
setParent
public void setParent(ClassRealm parent)
Deprecated.- Specified by:
setParent
in interfaceClassRealm
-
getId
public String getId()
Deprecated.- Specified by:
getId
in interfaceClassRealm
-
getWorld
public ClassWorld getWorld()
Deprecated.- Specified by:
getWorld
in interfaceClassRealm
-
importFrom
public void importFrom(String realmId, String packageName) throws NoSuchRealmException
Deprecated.- Specified by:
importFrom
in interfaceClassRealm
- Throws:
NoSuchRealmException
-
addConstituent
public void addConstituent(URL constituent)
Deprecated.- Specified by:
addConstituent
in interfaceClassRealm
-
addConstituent
public void addConstituent(String constituent, byte[] b) throws 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 nameb
- the class definition as a byte[]- Throws:
ClassNotFoundException
- when class couldn't be loaded
-
locateSourceRealm
public ClassRealm locateSourceRealm(String classname)
Deprecated.- Specified by:
locateSourceRealm
in interfaceClassRealm
-
getClassLoader
public ClassLoader getClassLoader()
Deprecated.- Specified by:
getClassLoader
in interfaceClassRealm
-
createChildRealm
public ClassRealm createChildRealm(String id) throws DuplicateRealmException
Deprecated.- Specified by:
createChildRealm
in interfaceClassRealm
- Throws:
DuplicateRealmException
-
loadClass
public Class loadClass(String name) throws ClassNotFoundException
Deprecated.- Specified by:
loadClass
in interfaceClassRealm
- Throws:
ClassNotFoundException
-
getResource
public URL getResource(String name)
Deprecated.- Specified by:
getResource
in interfaceClassRealm
-
getResourceAsStream
public InputStream getResourceAsStream(String name)
Deprecated.- Specified by:
getResourceAsStream
in interfaceClassRealm
-
findResources
public Enumeration findResources(String name) throws IOException
Deprecated.- Specified by:
findResources
in interfaceClassRealm
- Throws:
IOException
-
display
public void display()
Deprecated.- Specified by:
display
in interfaceClassRealm
-
-