Enum PropertyCodeGenerator.Initially

java.lang.Object
java.lang.Enum<PropertyCodeGenerator.Initially>
org.inferred.freebuilder.processor.property.PropertyCodeGenerator.Initially
All Implemented Interfaces:
Serializable, Comparable<PropertyCodeGenerator.Initially>, java.lang.constant.Constable
Enclosing class:
PropertyCodeGenerator

public static enum PropertyCodeGenerator.Initially extends Enum<PropertyCodeGenerator.Initially>
General behaviour type for a fresh or reset property.
  • Enum Constant Details

    • REQUIRED

      public static final PropertyCodeGenerator.Initially REQUIRED
      The property must have a value set before build can be called.

      This may simply mean we have not detected the property being set in the builder's constructor. The property's field may be null in the builder or on a partial, but will never be null on a value instance.

    • OPTIONAL

      public static final PropertyCodeGenerator.Initially OPTIONAL
      The property need not be set.

      This may mean the user chose an explicit Optional type (e.g. Java 8's Optional), or it may mean a Nullable annotation has been spotted. The property's field may be null.

    • HAS_DEFAULT

      public static final PropertyCodeGenerator.Initially HAS_DEFAULT
      The property is known to have a default value.

      This may be because we detected the property being set in the builder's constructor, or because the type itself has a reasonable default (e.g. an empty collection). The property's field will never be null.

  • Constructor Details

    • Initially

      private Initially()
  • Method Details

    • values

      public static PropertyCodeGenerator.Initially[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PropertyCodeGenerator.Initially valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null