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.
  • Enum Constant Details

  • Constructor Details

    • Illegal

      private Illegal()
  • Method Details

    • values

      public static MethodAccessorFactory.Illegal[] 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

      public static MethodAccessorFactory.Illegal valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • registerAccessorFor

      public MethodDescription.InDefinedShape registerAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation, MethodAccessorFactory.AccessType accessType)
      Registers an accessor method for a Implementation.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 interface MethodAccessorFactory
      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 given FieldDescription 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 is static, this accessor method is also static.
      Specified by:
      registerGetterFor in interface MethodAccessorFactory
      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 given FieldDescription which might itself not be accessible from outside the class. The returned setter method defines the field type as its only argument type, returns void and is of package-private visibility, similarly to the Java compiler's accessor methods. If the field is static, this accessor method is also static.
      Specified by:
      registerSetterFor in interface MethodAccessorFactory
      Parameters:
      fieldDescription - The field which is to be accessed.
      accessType - The required access type.
      Returns:
      A setter method for the given field.