Package com.google.inject.internal.aop
Class ChildClassDefiner
- java.lang.Object
-
- com.google.inject.internal.aop.ChildClassDefiner
-
- All Implemented Interfaces:
ClassDefiner
final class ChildClassDefiner extends java.lang.Object implements ClassDefiner
ClassDefinerthat defines classes using childClassLoaders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classChildClassDefiner.ChildLoaderCustom class loader that grants access to defineClassprivate static classChildClassDefiner.ChildLoaderCacheHolderprivate static classChildClassDefiner.SystemChildLoaderHolder
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ChildClassDefiner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ChildClassDefiner.ChildLoaderchildLoader(java.lang.ClassLoader hostLoader)Creates a child loader for the given host loaderjava.lang.Class<?>define(java.lang.Class<?> hostClass, byte[] bytecode)Defines a new class relative to the host.(package private) static <T> TdoPrivileged(java.security.PrivilegedAction<T> action)Utility method to remove doPrivileged ambiguity
-
-
-
Method Detail
-
define
public java.lang.Class<?> define(java.lang.Class<?> hostClass, byte[] bytecode) throws java.lang.ExceptionDescription copied from interface:ClassDefinerDefines a new class relative to the host.- Specified by:
definein interfaceClassDefiner- Throws:
java.lang.Exception
-
doPrivileged
static <T> T doPrivileged(java.security.PrivilegedAction<T> action)
Utility method to remove doPrivileged ambiguity
-
childLoader
static ChildClassDefiner.ChildLoader childLoader(java.lang.ClassLoader hostLoader)
Creates a child loader for the given host loader
-
-