final class ChildClassDefiner extends java.lang.Object implements ClassDefiner
ClassDefiner that defines classes using child ClassLoaders.| Modifier and Type | Class and Description |
|---|---|
private static class |
ChildClassDefiner.ChildLoader
Custom class loader that grants access to defineClass
|
private static class |
ChildClassDefiner.ChildLoaderCacheHolder |
private static class |
ChildClassDefiner.SystemChildLoaderHolder |
| Modifier and Type | Field and Description |
|---|---|
private static java.util.logging.Logger |
logger |
| Constructor and Description |
|---|
ChildClassDefiner() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static ChildClassDefiner.ChildLoader |
childLoader(java.lang.ClassLoader hostLoader)
Creates a child loader for the given host loader
|
java.lang.Class<?> |
define(java.lang.Class<?> hostClass,
byte[] bytecode)
Defines a new class relative to the host.
|
(package private) static <T> T |
doPrivileged(java.security.PrivilegedAction<T> action)
Utility method to remove doPrivileged ambiguity
|
public java.lang.Class<?> define(java.lang.Class<?> hostClass,
byte[] bytecode)
throws java.lang.Exception
ClassDefinerdefine in interface ClassDefinerjava.lang.Exceptionstatic <T> T doPrivileged(java.security.PrivilegedAction<T> action)
static ChildClassDefiner.ChildLoader childLoader(java.lang.ClassLoader hostLoader)