Enum PropertyCodeGenerator.Initially
- java.lang.Object
-
- java.lang.Enum<PropertyCodeGenerator.Initially>
-
- org.inferred.freebuilder.processor.property.PropertyCodeGenerator.Initially
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PropertyCodeGenerator.Initially>
- Enclosing class:
- PropertyCodeGenerator
public static enum PropertyCodeGenerator.Initially extends java.lang.Enum<PropertyCodeGenerator.Initially>
General behaviour type for a fresh or reset property.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HAS_DEFAULTThe property is known to have a default value.OPTIONALThe property need not be set.REQUIREDThe property must have a value set before build can be called.
-
Constructor Summary
Constructors Modifier Constructor Description privateInitially()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertyCodeGenerator.InitiallyvalueOf(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.
-
-
-
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.
-
-
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 namejava.lang.NullPointerException- if the argument is null
-
-