Package com.google.inject.internal.aop
Class ClassDefining
- java.lang.Object
-
- com.google.inject.internal.aop.ClassDefining
-
public final class ClassDefining extends java.lang.Object
Entry-point for defining dynamically generated classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ClassDefining.ClassDefinerHolder
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CLASS_DEFINING_UNSUPPORTED
private static java.util.logging.Logger
logger
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassDefining()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static ClassDefiner
bindClassDefiner()
Binds the preferredClassDefiner
instance.static boolean
canDowncastToProxy(java.lang.Class<?> hostClass)
Returns true if it's possible to downcast to proxies defined from the given host.static boolean
canLoadProxyByName(java.lang.Class<?> hostClass)
Returns true if it's possible to load by name proxies defined from the given host.static java.lang.Class<?>
define(java.lang.Class<?> hostClass, byte[] bytecode)
Defines a new class relative to the host.static boolean
hasPackageAccess()
Returns true if the current class definer allows access to package-private members.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
CLASS_DEFINING_UNSUPPORTED
private static final java.lang.String CLASS_DEFINING_UNSUPPORTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
define
public static java.lang.Class<?> define(java.lang.Class<?> hostClass, byte[] bytecode) throws java.lang.Exception
Defines a new class relative to the host.- Throws:
java.lang.Exception
-
hasPackageAccess
public static boolean hasPackageAccess()
Returns true if the current class definer allows access to package-private members.
-
canLoadProxyByName
public static boolean canLoadProxyByName(java.lang.Class<?> hostClass)
Returns true if it's possible to load by name proxies defined from the given host.
-
canDowncastToProxy
public static boolean canDowncastToProxy(java.lang.Class<?> hostClass)
Returns true if it's possible to downcast to proxies defined from the given host.
-
bindClassDefiner
static ClassDefiner bindClassDefiner()
Binds the preferredClassDefiner
instance.
-
-