ClassDefiner that defines classes using sun.misc.Unsafe.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private static final String | |
| private static final String | |
| private static final String[] | |
| private static final String | |
| private static final Logger | |
| private static final ClassDefiner |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ClassDefiner | accessDefineClass(Class<?> loaderClass)
Generates helper in same package as the |
| private static byte[] | buildDefineClassAccess(Class<?> loaderClass)
|
| public static boolean | canDowncastToProxy(Class<?> hostClass)
Returns true if it's possible to downcast to proxies defined from the given host. |
| public static boolean | canLoadProxyByName(Class<?> hostClass)
Returns true if it's possible to load by name proxies defined from the given host. |
| public Class | define(Class<?> hostClass, byte[] bytecode)
Implements com. |
| private static ClassDefiner | findClassDefiner(ClassLoader hostLoader)
Finds the appropriate class definer for the given class loader. |
| public static boolean | |
| pack-priv static ClassDefiner | |
| pack-priv static <T> T |
| ALWAYS_DEFINE_ANONYMOUSLY | back to summary |
|---|---|
| private static final boolean ALWAYS_DEFINE_ANONYMOUSLY | |
| BYTE_ARRAY_TYPE | back to summary |
|---|---|
| private static final String BYTE_ARRAY_TYPE | |
| CLASS_LOADER_TYPE | back to summary |
|---|---|
| private static final String CLASS_LOADER_TYPE | |
| DEFINEACCESS_API | back to summary |
|---|---|
| private static final String[] DEFINEACCESS_API | |
| DEFINEACCESS_BY_GUICE_MARKER | back to summary |
|---|---|
| private static final String DEFINEACCESS_BY_GUICE_MARKER | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| UNSAFE_DEFINER | back to summary |
|---|---|
| private static final ClassDefiner UNSAFE_DEFINER | |
| UnsafeClassDefiner | back to summary |
|---|---|
| pack-priv UnsafeClassDefiner() | |
| accessDefineClass | back to summary |
|---|---|
| pack-priv static ClassDefiner accessDefineClass(Class<?> loaderClass) throws Exception Generates helper in same package as the
| |
| buildDefineClassAccess | back to summary |
|---|---|
| private static byte[] buildDefineClassAccess(Class<?> loaderClass)
| |
| canDowncastToProxy | back to summary |
|---|---|
| public static boolean canDowncastToProxy(Class<?> hostClass) Returns true if it's possible to downcast to proxies defined from the given host. | |
| canLoadProxyByName | back to summary |
|---|---|
| public static boolean canLoadProxyByName(Class<?> hostClass) Returns true if it's possible to load by name proxies defined from the given host. | |
| define | back to summary |
|---|---|
| public Class Implements com. Doc from com. Defines a new class relative to the host.
| |
| findClassDefiner | back to summary |
|---|---|
| private static ClassDefiner findClassDefiner(ClassLoader hostLoader) Finds the appropriate class definer for the given class loader. | |
| isAccessible | back to summary |
|---|---|
| public static boolean isAccessible() Do we have access to | |
| tryAccessDefineClass | back to summary |
|---|---|
| pack-priv static ClassDefiner tryAccessDefineClass(Class<?> loaderClass) | |
| tryPrivileged | back to summary |
|---|---|
| pack-priv static <T> T tryPrivileged(PrivilegedExceptionAction<T> action, String errorMessage) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ClassDefiner |
| Access | Constructor and Description |
|---|---|
| private |
| CLASS_LOADER_DEFINE_CLASS | back to summary |
|---|---|
| pack-priv static final ClassDefiner CLASS_LOADER_DEFINE_CLASS | |
| ClassLoaderDefineClassHolder | back to summary |
|---|---|
| private ClassLoaderDefineClassHolder() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final LoadingCache |
| Access | Constructor and Description |
|---|---|
| private |
| DEFINE_CLASS_CACHE | back to summary |
|---|---|
| pack-priv static final LoadingCache<Class<?>, ClassDefiner> DEFINE_CLASS_CACHE | |
| DefineClassCacheHolder | back to summary |
|---|---|
| private DefineClassCacheHolder() | |