Top Description Fields Constructors Methods
net.bytebuddy.implementation.auxiliary

public final Enum PrivilegedMemberLookupAction

extends Enum<PrivilegedMemberLookupAction>
implements AuxiliaryType
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.auxiliary.AuxiliaryType
Imports
net.bytebuddy.ByteBuddy, .ClassFileVersion, net.bytebuddy.description.method.MethodDescription, net.bytebuddy.description.modifier.Visibility, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.dynamic.DynamicType, net.bytebuddy.dynamic.scaffold.TypeValidation, net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy, net.bytebuddy.implementation.FieldAccessor, .Implementation, .MethodAccessorFactory, .MethodCall, net.bytebuddy.utility.CompoundList, .RandomString, java.security.PrivilegedExceptionAction, java.util.ArrayList, .Collections, .LinkedHashMap, .Map

A PrivilegedExceptionAction to lookup a method constant using an java.security.AccessController.

Field Summary

Modifier and TypeField and Description
private static final MethodDescription.InDefinedShape
DEFAULT_CONSTRUCTOR

The default constructor of the Object class.

private final Map<String, Class<?>>
fields

A mapping of field names to their types in a fixed iteration order.

public static final PrivilegedMemberLookupAction
public static final PrivilegedMemberLookupAction
public static final PrivilegedMemberLookupAction
public static final PrivilegedMemberLookupAction
private final MethodDescription.InDefinedShape
methodDescription

The method to invoke from the action.

private static final String
TYPE_FIELD

The name of the field that holds the type instance to look the method up from.

Constructor Summary

AccessConstructor and Description
private
PrivilegedMemberLookupAction(String
The name of the method.
name
,
String
The name of a field to define.
field
,
Class<?>
The type of the field to define.
type
)

Creates a privileged method constant action with one argument.

private
PrivilegedMemberLookupAction(String
The name of the method.
name
,
String
The name of the first field to define.
firstField
,
Class<?>
The type of the first field to define.
firstType
,
String
The name of the second field to define.
secondField
,
Class<?>
The type of the second field to define.
secondType
)

Creates a privileged method constant action with one argument.

Method Summary

Modifier and TypeMethod and Description
public String
getSuffix()

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Produces a suffix that gives this auxiliary type a stable name.
public DynamicType
make(String
The fully qualified binary name for this auxiliary type. The type should be in the same package than the instrumented type this auxiliary type is providing services to in order to allow package-private access.
auxiliaryTypeName
,
ClassFileVersion
The class file version the auxiliary class should be written in.
classFileVersion
,
MethodAccessorFactory
A factory for accessor methods.
methodAccessorFactory
)

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Creates a new auxiliary type.
public static AuxiliaryType

Returns:

An appropriate auxiliary type.
of
(MethodDescription
The method description to represent as a constant.
methodDescription
)

Returns an auxiliary type for loading the supplied method description as a constant.

public static PrivilegedMemberLookupAction
public static PrivilegedMemberLookupAction[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULT_CONSTRUCTORback to summary
private static final MethodDescription.InDefinedShape DEFAULT_CONSTRUCTOR

The default constructor of the Object class.

fieldsback to summary
private final Map<String, Class<?>> fields

A mapping of field names to their types in a fixed iteration order.

FOR_DECLARED_CONSTRUCTORback to summary
public static final PrivilegedMemberLookupAction FOR_DECLARED_CONSTRUCTOR

Looks up a method using Class#getDeclaredConstructor(Class[]).

FOR_DECLARED_METHODback to summary
public static final PrivilegedMemberLookupAction FOR_DECLARED_METHOD

Looks up a method using Class#getDeclaredMethod(String, Class[]).

FOR_PUBLIC_CONSTRUCTORback to summary
public static final PrivilegedMemberLookupAction FOR_PUBLIC_CONSTRUCTOR

Looks up a method using Class#getConstructor(Class[]).

FOR_PUBLIC_METHODback to summary
public static final PrivilegedMemberLookupAction FOR_PUBLIC_METHOD

Looks up a method using Class#getDeclaredMethod(String, Class[]).

methodDescriptionback to summary
private final MethodDescription.InDefinedShape methodDescription

The method to invoke from the action.

TYPE_FIELDback to summary
private static final String TYPE_FIELD

The name of the field that holds the type instance to look the method up from.

Constructor Detail

PrivilegedMemberLookupActionback to summary
private PrivilegedMemberLookupAction(String name, String field, Class<?> type)

Creates a privileged method constant action with one argument.

Parameters
name:String

The name of the method.

field:String

The name of a field to define.

type:Class<?>

The type of the field to define.

PrivilegedMemberLookupActionback to summary
private PrivilegedMemberLookupAction(String name, String firstField, Class<?> firstType, String secondField, Class<?> secondType)

Creates a privileged method constant action with one argument.

Parameters
name:String

The name of the method.

firstField:String

The name of the first field to define.

firstType:Class<?>

The type of the first field to define.

secondField:String

The name of the second field to define.

secondType:Class<?>

The type of the second field to define.

Method Detail

getSuffixback to summary
public String getSuffix()

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Doc from net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Produces a suffix that gives this auxiliary type a stable name. A best effort is made that this suffix is unique.

Returns:String

The suffix for this auxiliary type.

makeback to summary
public DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Doc from net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Creates a new auxiliary type.

Parameters
auxiliaryTypeName:String

The fully qualified binary name for this auxiliary type. The type should be in the same package than the instrumented type this auxiliary type is providing services to in order to allow package-private access.

classFileVersion:ClassFileVersion

The class file version the auxiliary class should be written in.

methodAccessorFactory:MethodAccessorFactory

A factory for accessor methods.

Returns:DynamicType

A dynamically created type representing this auxiliary type.

ofback to summary
public static AuxiliaryType of(MethodDescription methodDescription)

Returns an auxiliary type for loading the supplied method description as a constant.

Parameters
methodDescription:MethodDescription

The method description to represent as a constant.

Returns:AuxiliaryType

An appropriate auxiliary type.

valueOfback to summary
public static PrivilegedMemberLookupAction valueOf(String name)
valuesback to summary
public static PrivilegedMemberLookupAction[] values()