Package net.bytebuddy.implementation
Enum MethodAccessorFactory.Illegal
- java.lang.Object
-
- java.lang.Enum<MethodAccessorFactory.Illegal>
-
- net.bytebuddy.implementation.MethodAccessorFactory.Illegal
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MethodAccessorFactory.Illegal>,MethodAccessorFactory
- Enclosing interface:
- MethodAccessorFactory
public static enum MethodAccessorFactory.Illegal extends java.lang.Enum<MethodAccessorFactory.Illegal> implements MethodAccessorFactory
A method accessor factory that forbids any accessor registration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodAccessorFactory
MethodAccessorFactory.AccessType, MethodAccessorFactory.Illegal
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCEThe singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateIllegal()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDescription.InDefinedShaperegisterAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation, MethodAccessorFactory.AccessType accessType)Registers an accessor method for aImplementation.SpecialMethodInvocationwhich cannot itself be triggered invoked directly from outside a type.MethodDescription.InDefinedShaperegisterGetterFor(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType)Registers a getter for the givenFieldDescriptionwhich might itself not be accessible from outside the class.MethodDescription.InDefinedShaperegisterSetterFor(FieldDescription fieldDescription, MethodAccessorFactory.AccessType accessType)Registers a setter for the givenFieldDescriptionwhich might itself not be accessible from outside the class.static MethodAccessorFactory.IllegalvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MethodAccessorFactory.Illegal[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodAccessorFactory.Illegal INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodAccessorFactory.Illegal[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MethodAccessorFactory.Illegal c : MethodAccessorFactory.Illegal.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodAccessorFactory.Illegal valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
registerAccessorFor
public MethodDescription.InDefinedShape registerAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation, MethodAccessorFactory.AccessType accessType)
Registers an accessor method for aImplementation.SpecialMethodInvocationwhich 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:
registerAccessorForin 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 givenFieldDescriptionwhich 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:
registerGetterForin 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 givenFieldDescriptionwhich might itself not be accessible from outside the class. The returned setter method defines the field type as its only argument type, returnsvoidand is of package-private visibility, similarly to the Java compiler's accessor methods. If the field isstatic, this accessor method is alsostatic.- Specified by:
registerSetterForin interfaceMethodAccessorFactory- Parameters:
fieldDescription- The field which is to be accessed.accessType- The required access type.- Returns:
- A setter method for the given field.
-
-