Top Description Fields Constructors Methods
com.google.inject.internal.aop

pack-priv final Class HiddenClassDefiner

extends Object
implements ClassDefiner
Class Inheritance
All Implemented Interfaces
com.google.inject.internal.aop.ClassDefiner
Imports
java.lang.invoke.MethodHandles.Lookup, java.lang.reflect.Array, .Field, .Method

ClassDefiner that defines classes using MethodHandles.Lookup#defineHiddenClass.
Author
[email protected] (Stuart McCulloch)

Field Summary

Modifier and TypeField and Description
private static final Object
private static final Method
private static final sun.misc.Unsafe
private static final Object
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static Object
classOptions(String... options)

Creates MethodHandles.Lookup.ClassOption array with the named options.

public Class<?>
define(Class<?> hostClass, byte[] bytecode)

Implements com.google.inject.internal.aop.ClassDefiner.define.

Defines a new class relative to the host.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HIDDEN_CLASS_OPTIONSback to summary
private static final Object HIDDEN_CLASS_OPTIONS
HIDDEN_DEFINE_METHODback to summary
private static final Method HIDDEN_DEFINE_METHOD
THE_UNSAFEback to summary
private static final sun.misc.Unsafe THE_UNSAFE
TRUSTED_LOOKUP_BASEback to summary
private static final Object TRUSTED_LOOKUP_BASE
TRUSTED_LOOKUP_OFFSETback to summary
private static final long TRUSTED_LOOKUP_OFFSET

Constructor Detail

HiddenClassDefinerback to summary
pack-priv HiddenClassDefiner()

Method Detail

classOptionsback to summary
private static Object classOptions(String... options) throws ClassNotFoundException

Creates MethodHandles.Lookup.ClassOption array with the named options.

Annotations
@SuppressWarnings:unchecked
defineback to summary
public Class<?> define(Class<?> hostClass, byte[] bytecode) throws Exception

Implements com.google.inject.internal.aop.ClassDefiner.define.

Doc from com.google.inject.internal.aop.ClassDefiner.define.

Defines a new class relative to the host.

Annotations
@Override