Enum MethodAccessorFactory.Illegal

    • Constructor Detail

      • Illegal

        private Illegal()
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • 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.