public class ByteArrayClassLoader
extends java.lang.ClassLoader
Constructor and Description |
---|
ByteArrayClassLoader(java.lang.ClassLoader parent)
Create a new instance of this class loader.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
defineClass(byte[] classData)
Define a class from a byte array.
|
java.lang.Class |
defineClass(byte[] classData,
java.lang.String hashStr)
Define a class from a byte array.
|
java.lang.Class |
getDefinedClass(java.lang.String hashStr)
Get an already defined class, addressed by the hash string of the class data.
|
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
public ByteArrayClassLoader(java.lang.ClassLoader parent)
parent
- the parent class loader used for delegationpublic java.lang.Class defineClass(byte[] classData)
classData
- the binary class datajava.lang.LinkageError
- if a class with the same name is already definedpublic java.lang.Class defineClass(byte[] classData, java.lang.String hashStr)
classData
- the binary class datahashStr
- the hash string of the class datajava.lang.LinkageError
- if a class with the same name is already definedpublic java.lang.Class getDefinedClass(java.lang.String hashStr)
hashStr
- the hash string of the class data