Enum BuilderFactory.TypeInference
- java.lang.Object
-
- java.lang.Enum<BuilderFactory.TypeInference>
-
- org.inferred.freebuilder.processor.BuilderFactory.TypeInference
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BuilderFactory.TypeInference>
- Enclosing class:
- BuilderFactory
public static enum BuilderFactory.TypeInference extends java.lang.Enum<BuilderFactory.TypeInference>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXPLICIT_TYPESTypes must be specified explicitly in the source, even when the diamond operator is available.INFERRED_TYPESTypes should be inferred where possible, as specifying them explicitly would be redundant.
-
Constructor Summary
Constructors Modifier Constructor Description privateTypeInference()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BuilderFactory.TypeInferencevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static BuilderFactory.TypeInference[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXPLICIT_TYPES
public static final BuilderFactory.TypeInference EXPLICIT_TYPES
Types must be specified explicitly in the source, even when the diamond operator is available.Use this when the expression result is not immediately assigned to a variable or returned from a method.
-
INFERRED_TYPES
public static final BuilderFactory.TypeInference INFERRED_TYPES
Types should be inferred where possible, as specifying them explicitly would be redundant.Use this when the expression result is immediately assigned to a variable or returned from a method. Do not use this when the expression result is passed directly into a method, as Java 6+7 cannot do type inference in this situation.
-
-
Method Detail
-
values
public static BuilderFactory.TypeInference[] 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 (BuilderFactory.TypeInference c : BuilderFactory.TypeInference.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BuilderFactory.TypeInference 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
-
-