private final class BCELWrapperGenerator.BCELClassLoader
extends java.lang.ClassLoader
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
m_byteCode
The byte code representing the wrapper class created by the
enclosing
BCELWrapperGenerated. |
private java.security.ProtectionDomain |
m_protectionDomain
The ProtectionDomain to use for the newly generated class.
|
| Constructor and Description |
|---|
BCELWrapperGenerator.BCELClassLoader()
Constructs a
BCELClassLoader with no parent. |
BCELWrapperGenerator.BCELClassLoader(java.lang.ClassLoader parent)
Constructs a
BCELClassLoader with the specified class
loader as its parent. |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class |
findClass(java.lang.String name) |
private byte[] |
getByteCode()
Returns the
byte code to use when loading a generated
class. |
private void |
setup(byte[] byteCode,
java.security.ProtectionDomain protectionDomain)
Passes in data needed to create and initialze the new class when
findClass is called by the
BCELWrapperGenerator. |
private void |
tearDown()
Clears the data used to generate a class to free up memory.
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprivate byte[] m_byteCode
BCELWrapperGenerated. This field will be
managed by the BCELWrapperGenerator.private java.security.ProtectionDomain m_protectionDomain
public BCELWrapperGenerator.BCELClassLoader(java.lang.ClassLoader parent)
BCELClassLoader with the specified class
loader as its parent.parent - The parent ClassLoaderpublic BCELWrapperGenerator.BCELClassLoader()
BCELClassLoader with no parent.protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
findClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionClassLoader.findClass(String)private void setup(byte[] byteCode,
java.security.ProtectionDomain protectionDomain)
throws java.lang.IllegalArgumentException
BCELWrapperGenerator.
This method will be called by the BCELWrapperGenerator
prior to asking this class loader for the generated wrapper class.byteCode - The byte code to use when loading
the generated classprotectionDomain - The ProtectionDomain to use when loading
the generated class.java.lang.IllegalArgumentException - If byteCode is null or
emptyprivate void tearDown()
BCELWrapperGenerator
immediately after this class loader has returned the generated wrapper
class.private byte[] getByteCode()
byte code to use when loading a generated
class.byte code for defining the generated class