Enum BuilderFactory
- All Implemented Interfaces:
Serializable,Comparable<BuilderFactory>,java.lang.constant.Constable
Standard ways of constructing a default Builder.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe enclosing class provides a static builder() factory method.The enclosing class provides a static newBuilder() factory method.A new Builder can be made by calling the class' no-args constructor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.google.common.collect.ImmutableSet<String> findPotentialStaticFactoryMethods(TypeElement builderType) static Optional<BuilderFactory> from(TypeElement builderType) Determines the correct way of constructing a defaultbuilderTypeinstance, if any.(package private) static booleanabstract ExcerptnewBuilder(Type builderType, BuilderFactory.TypeInference typeInference) Returns an excerpt calling the Builder factory method.private static booleantypeIsAbstract(TypeElement type) static BuilderFactoryReturns the enum constant of this type with the specified name.static BuilderFactory[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_ARGS_CONSTRUCTOR
A new Builder can be made by calling the class' no-args constructor. -
BUILDER_METHOD
The enclosing class provides a static builder() factory method. -
NEW_BUILDER_METHOD
The enclosing class provides a static newBuilder() factory method.
-
-
Constructor Details
-
BuilderFactory
private BuilderFactory()
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
from
Determines the correct way of constructing a defaultbuilderTypeinstance, if any. -
newBuilder
Returns an excerpt calling the Builder factory method. -
typeIsAbstract
-
hasNoArgsConstructor
-
findPotentialStaticFactoryMethods
private static com.google.common.collect.ImmutableSet<String> findPotentialStaticFactoryMethods(TypeElement builderType)
-