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
methods, 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.addNoFieldsConstructor
(Modifier... modifiers) Add a constructor with no arguments.addProperty
(PropertyDef property) addTypeVariable
(TypeDef.TypeVariable typeVariable) build()
superclass
(ClassTypeDef superclass) Methods inherited from class io.micronaut.sourcegen.model.ObjectDefBuilder
addMethod, addSuperinterface
Methods inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addJavadoc, addModifiers
-
Method Details
-
superclass
-
addField
-
addProperty
-
addTypeVariable
-
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
-