Package net.bytebuddy.implementation
Enum Class MethodAccessorFactory.Illegal
java.lang.Object
java.lang.Enum<MethodAccessorFactory.Illegal>
net.bytebuddy.implementation.MethodAccessorFactory.Illegal
- All Implemented Interfaces:
Serializable
,Comparable<MethodAccessorFactory.Illegal>
,Constable
,MethodAccessorFactory
- Enclosing interface:
MethodAccessorFactory
public static enum MethodAccessorFactory.Illegal
extends Enum<MethodAccessorFactory.Illegal>
implements MethodAccessorFactory
A method accessor factory that forbids any accessor registration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodAccessorFactory
MethodAccessorFactory.AccessType, MethodAccessorFactory.Illegal
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionregisterAccessorFor
(Implementation.SpecialMethodInvocation specialMethodInvocation, MethodAccessorFactory.AccessType accessType) Registers an accessor method for aImplementation.SpecialMethodInvocation
which cannot itself be triggered invoked directly from outside a type.registerGetterFor
(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType) Registers a getter for the givenFieldDescription
which might itself not be accessible from outside the class.registerSetterFor
(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType) Registers a setter for the givenFieldDescription
which might itself not be accessible from outside the class.Returns the enum constant of this class with the specified name.static MethodAccessorFactory.Illegal[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
Illegal
private Illegal()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
registerAccessorFor
public MethodDescription.InDefinedShape registerAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation, MethodAccessorFactory.AccessType accessType) Registers an accessor method for aImplementation.SpecialMethodInvocation
which cannot itself be triggered invoked directly from outside a type. The method is registered on the instrumented type with package-private visibility, similarly to a Java compiler's accessor methods.- Specified by:
registerAccessorFor
in interfaceMethodAccessorFactory
- Parameters:
specialMethodInvocation
- The special method invocation.accessType
- The required access type.- Returns:
- The accessor method for invoking the special method invocation.
-
registerGetterFor
public MethodDescription.InDefinedShape registerGetterFor(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType) Registers a getter for the givenFieldDescription
which might itself not be accessible from outside the class. The returned getter method defines the field type as its return type, does not take any arguments and is of package-private visibility, similarly to the Java compiler's accessor methods. If the field isstatic
, this accessor method is alsostatic
.- Specified by:
registerGetterFor
in interfaceMethodAccessorFactory
- Parameters:
fieldDescription
- The field which is to be accessed.accessType
- The required access type.- Returns:
- A getter method for the given field.
-
registerSetterFor
public MethodDescription.InDefinedShape registerSetterFor(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType) Registers a setter for the givenFieldDescription
which might itself not be accessible from outside the class. The returned setter method defines the field type as its only argument type, returnsvoid
and is of package-private visibility, similarly to the Java compiler's accessor methods. If the field isstatic
, this accessor method is alsostatic
.- Specified by:
registerSetterFor
in interfaceMethodAccessorFactory
- Parameters:
fieldDescription
- The field which is to be accessed.accessType
- The required access type.- Returns:
- A setter method for the given field.
-