Package io.micronaut.sourcegen.model
Class ClassDef.ClassDefBuilder
java.lang.Object
io.micronaut.sourcegen.model.AbstractElementBuilder<ThisType>
io.micronaut.sourcegen.model.ObjectDefBuilder<ClassDef.ClassDefBuilder>
io.micronaut.sourcegen.model.ClassDef.ClassDefBuilder
- Enclosing class:
- ClassDef
public static final class ClassDef.ClassDefBuilder
extends ObjectDefBuilder<ClassDef.ClassDefBuilder>
The class 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.addConstructor
(Collection<ParameterDef> parameterDefs, Modifier... modifiers) Add a constructor.addFields
(Collection<FieldDef> fields) Adds fields.addNoFieldsConstructor
(Modifier... modifiers) Add a constructor with no arguments.addStaticInitializer
(StatementDef staticInitializer) addTypeVariable
(TypeDef.TypeVariable typeVariable) build()
superclass
(ClassTypeDef superclass) 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
-
superclass
-
addField
-
addFields
Adds fields.- Parameters:
fields
- The fields- Returns:
- the builder
- Since:
- 1.5
-
addTypeVariable
-
addStaticInitializer
-
build
-
addConstructor
public ClassDef.ClassDefBuilder 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.- Parameters:
modifiers
- The modifiers- Returns:
- this
-
addNoFieldsConstructor
Add a constructor with no arguments.- Parameters:
modifiers
- The method modifiers- Returns:
- this
-