Package io.micronaut.sourcegen.model
Class EnumDef.EnumDefBuilder
java.lang.Object
io.micronaut.sourcegen.model.AbstractElementBuilder<ThisType>
io.micronaut.sourcegen.model.ObjectDefBuilder<EnumDef.EnumDefBuilder>
io.micronaut.sourcegen.model.EnumDef.EnumDefBuilder
- Enclosing class:
- EnumDef
The enum definition builder.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from class io.micronaut.sourcegen.model.ObjectDefBuilder
innerTypes, methods, properties, superinterfaces
Fields inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
annotations, javadoc, modifiers, name, thisInstance
-
Method Summary
Modifier and TypeMethodDescriptionaddAllFieldsConstructor
(Modifier... modifiers) Add a constructor for all fields and property.addConstructor
(Collection<ParameterDef> parameterDefs, Modifier... modifiers) Add a constructor.addEnumConstant
(String name) addEnumConstant
(String name, ExpressionDef... values) addNoFieldsConstructor
(Modifier... modifiers) Add a constructor with no arguments.build()
Methods inherited from class io.micronaut.sourcegen.model.ObjectDefBuilder
addInnerType, addInnerType, addMethod, addMethods, addProperty, addSuperinterface, addSuperinterfaces
Methods inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotations, addAnnotations, addJavadoc, addModifiers, addModifiers, overrideModifiers
-
Method Details
-
addField
-
addEnumConstant
-
addEnumConstant
-
build
-
addConstructor
public EnumDef.EnumDefBuilder addConstructor(Collection<ParameterDef> parameterDefs, Modifier... modifiers) Add a constructor.- Parameters:
parameterDefs
- The fields to set in the constructormodifiers
- The method modifiers- Returns:
- this
-
addAllFieldsConstructor
Add a constructor for all fields and property.- Parameters:
modifiers
- The modifiers- Returns:
- this
-
addNoFieldsConstructor
Add a constructor with no arguments.- Parameters:
modifiers
- The method modifiers- Returns:
- this
-