public enum PrivilegedMemberLookupAction extends Enum<PrivilegedMemberLookupAction> implements AuxiliaryType
PrivilegedExceptionAction
to lookup a method constant using an java.security.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[]) . |
DEFAULT_TYPE_MODIFIER
Modifier and Type | Method and Description |
---|---|
String |
getSuffix()
Produces a suffix that gives this auxiliary type a stable name.
|
DynamicType |
make(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(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[])
.public static PrivilegedMemberLookupAction[] values()
for (PrivilegedMemberLookupAction c : PrivilegedMemberLookupAction.values()) System.out.println(c);
public static PrivilegedMemberLookupAction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static AuxiliaryType of(MethodDescription methodDescription)
methodDescription
- The method description to represent as a constant.public String getSuffix()
getSuffix
in interface AuxiliaryType
public DynamicType make(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.Copyright © 2014–2024. All rights reserved.