Enum PropertyCodeGenerator.Initially

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HAS_DEFAULT
      The property is known to have a default value.
      OPTIONAL
      The property need not be set.
      REQUIRED
      The property must have a value set before build can be called.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Initially()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PropertyCodeGenerator.Initially valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PropertyCodeGenerator.Initially[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • Initially

        private Initially()
    • Method Detail

      • values

        public static PropertyCodeGenerator.Initially[] 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 (PropertyCodeGenerator.Initially c : PropertyCodeGenerator.Initially.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PropertyCodeGenerator.Initially 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