DefaultsMode (Groovy 5.0.8)

Package: groovy.transform

## [Java] Enum DefaultsMode

- groovy.transform.DefaultsMode

-     public enum DefaultsMode
      extends Enum

  Intended mode to use when generating constructors to emulate default parameter values when using the TupleConstructor annotation.

  Since:
    4.0.0
  See Also:
    TupleConstructor

- - ### Enum Constants Summary

    Enum constants classes
    Enum constant | Description
    --- | ---
    `AUTO` | Produce multiple constructors as required to handle any mandatory and optional arguments.
    `OFF` | Produce a single constructor corresponding to the complete list of properties/fields of the class being compiled.
    `ON` | Produce multiple constructors as required from all parameters through to the no-arg constructor.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Enum` | `compareTo, compareTo, describeConstable, equals, getClass, getDeclaringClass, hashCode, name, notify, notifyAll, ordinal, toString, valueOf, wait, wait, wait`

- - ### Enum Constant Detail

    - #### DefaultsMode AUTO

      Produce multiple constructors as required to handle any mandatory and optional arguments. An argument is optional if the respective property/field has an explicit initial value. A property/field without an initial value is deemed mandatory.

    - #### DefaultsMode OFF

      Produce a single constructor corresponding to the complete list of properties/fields of the class being compiled.

    - #### DefaultsMode ON

      Produce multiple constructors as required from all parameters through to the no-arg constructor. Defaults will be set according to any explicit initial values or the default value otherwise.