public enum PrivilegedMemberLookupAction extends java.lang.Enum<PrivilegedMemberLookupAction> implements AuxiliaryType
PrivilegedExceptionAction
to lookup a method constant using an AccessController
.AuxiliaryType.NamingStrategy, AuxiliaryType.SignatureRelevant
Enum Constant and Description |
---|
FOR_DECLARED_CONSTRUCTOR
Looks up a method using
Class.getDeclaredConstructor(Class[]) . |
FOR_DECLARED_METHOD
Looks up a method using
Class.getDeclaredMethod(String, Class[]) . |
FOR_PUBLIC_CONSTRUCTOR
Looks up a method using
Class.getConstructor(Class[]) . |
FOR_PUBLIC_METHOD
Looks up a method using
Class.getDeclaredMethod(String, Class[]) . |
Modifier and Type | Field and Description |
---|---|
private static MethodDescription.InDefinedShape |
DEFAULT_CONSTRUCTOR
The default constructor of the
Object class. |
private java.util.Map<java.lang.String,java.lang.Class<?>> |
fields
A mapping of field names to their types in a fixed iteration order.
|
private MethodDescription.InDefinedShape |
methodDescription
The method to invoke from the action.
|
private static java.lang.String |
TYPE_FIELD
The name of the field that holds the type instance to look the method up from.
|
DEFAULT_TYPE_MODIFIER
Modifier and Type | Method and Description |
---|---|
DynamicType |
make(java.lang.String auxiliaryTypeName,
ClassFileVersion classFileVersion,
MethodAccessorFactory methodAccessorFactory)
Creates a new auxiliary type.
|
static AuxiliaryType |
of(MethodDescription methodDescription)
Returns an auxiliary type for loading the supplied method description as a constant.
|
static PrivilegedMemberLookupAction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PrivilegedMemberLookupAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PrivilegedMemberLookupAction FOR_PUBLIC_METHOD
Class.getDeclaredMethod(String, Class[])
.public static final PrivilegedMemberLookupAction FOR_DECLARED_METHOD
Class.getDeclaredMethod(String, Class[])
.public static final PrivilegedMemberLookupAction FOR_PUBLIC_CONSTRUCTOR
Class.getConstructor(Class[])
.public static final PrivilegedMemberLookupAction FOR_DECLARED_CONSTRUCTOR
Class.getDeclaredConstructor(Class[])
.private static final java.lang.String TYPE_FIELD
private static final MethodDescription.InDefinedShape DEFAULT_CONSTRUCTOR
Object
class.private final MethodDescription.InDefinedShape methodDescription
private final java.util.Map<java.lang.String,java.lang.Class<?>> fields
public static PrivilegedMemberLookupAction[] values()
for (PrivilegedMemberLookupAction c : PrivilegedMemberLookupAction.values()) System.out.println(c);
public static PrivilegedMemberLookupAction valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static AuxiliaryType of(MethodDescription methodDescription)
methodDescription
- The method description to represent as a constant.public DynamicType make(java.lang.String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)
make
in interface AuxiliaryType
auxiliaryTypeName
- 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
- The class file version the auxiliary class should be written in.methodAccessorFactory
- A factory for accessor methods.