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
ClassDefiner
that defines classes using childClassLoader
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ChildClassDefiner.ChildLoader
Custom class loader that grants access to defineClassprivate static class
ChildClassDefiner.ChildLoaderCacheHolder
private static class
ChildClassDefiner.SystemChildLoaderHolder
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Logger
logger
-
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.ChildLoader
childLoader(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> T
doPrivileged(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.Exception
Description copied from interface:ClassDefiner
Defines a new class relative to the host.- Specified by:
define
in 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
-
-