Enum Class OptionMethodType

java.lang.Object
java.lang.Enum<OptionMethodType>
io.helidon.builder.codegen.OptionMethodType
All Implemented Interfaces:
Serializable, Comparable<OptionMethodType>, Constable

public enum OptionMethodType extends Enum<OptionMethodType>
All possible setters to be generated.
  • Enum Constant Details

    • PROTOTYPE_GETTER

      public static final OptionMethodType PROTOTYPE_GETTER
      Getter added to the prototype interface. This method may not be generated if the method is inherited from a public interface.

      All methods from blueprint are re-generated on prototype.

    • IMPL_GETTER

      public static final OptionMethodType IMPL_GETTER
      Getter on the prototype implementation class. This method always returns the declared type, as it implements a method either from the prototype or from an inherited public interface.
    • BUILDER_GETTER

      public static final OptionMethodType BUILDER_GETTER
      Getter on the builder base class. Returns the declared type except for required options without a default, where it returns Optional of the declared type.
    • BUILDER_SETTER

      public static final OptionMethodType BUILDER_SETTER
      The "main" setter method on the builder base class. This method uses the declared type of the option, except for Optional and Supplier options, where it uses the first type argument, and for char array, where we use String.
    • BUILDER_SETTER_CHAR_ARRAY

      public static final OptionMethodType BUILDER_SETTER_CHAR_ARRAY
      Setter specific to char array options. There will always be the BUILDER_SETTER with String parameter, and under this type a setter with char array parameter.
    • BUILDER_SETTER_DECLARED

      public static final OptionMethodType BUILDER_SETTER_DECLARED
      Only created for Optional and Supplier options, with the declared type.
    • BUILDER_ADD_COLLECTION

      public static final OptionMethodType BUILDER_ADD_COLLECTION
      Only created for Set, List options. Uses the declared type, but instead of replacing the values as BUILDER_SETTER does, this method adds the values to the collection.
    • BUILDER_CLEAR

      public static final OptionMethodType BUILDER_CLEAR
      Method to clear the current value(s) of the option. Only generated for Set, List, Map, and Optional options.
    • BUILDER_SINGULAR_ADD

      public static final OptionMethodType BUILDER_SINGULAR_ADD
      Singular add/put method for List, Set, or Map. Must be explicitly annotated on an option, otherwise singular methods are not generated.
      See Also:
    • BUILDER_SINGULAR_ADD_CONSUMER

      public static final OptionMethodType BUILDER_SINGULAR_ADD_CONSUMER
      Singular add method for builder consumer.
      See Also:
    • BUILDER_SINGULAR_ADD_TO_MAP_VALUE

      public static final OptionMethodType BUILDER_SINGULAR_ADD_TO_MAP_VALUE
      Singular add method to add a value to a collection that is a value of a Map.
      See Also:
    • BUILDER_SINGULAR_ADD_TO_MAP_VALUES

      public static final OptionMethodType BUILDER_SINGULAR_ADD_TO_MAP_VALUES
      Singular add method to add values to a collection that is a value of a Map.
      See Also:
    • BUILDER_SETTER_CONSUMER

      public static final OptionMethodType BUILDER_SETTER_CONSUMER
      Only created if the option type itself has a builder. This method uses a Consumer of the builder type.
      See Also:
    • BUILDER_SETTER_RUNTIME_TYPE_PROTOTYPE

      public static final OptionMethodType BUILDER_SETTER_RUNTIME_TYPE_PROTOTYPE
      Only created if the option type is built by another prototype, or if there is a factory method to build the type from another prototype.
    • BUILDER_SETTER_SUPPLIER

      public static final OptionMethodType BUILDER_SETTER_SUPPLIER
      Only created if the option type itself has a builder. This method uses a Supplier of the type, as our builders are also supplier, so you can pass an instance of the builder.
      See Also:
  • Method Details

    • values

      public static OptionMethodType[] 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 OptionMethodType 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