Package io.micronaut.sourcegen.model
Class ObjectDefBuilder<ThisType>
java.lang.Object
io.micronaut.sourcegen.model.AbstractElementBuilder<ThisType>
io.micronaut.sourcegen.model.ObjectDefBuilder<ThisType>
- Type Parameters:
ThisType- The type of this builder
- Direct Known Subclasses:
ClassDef.ClassDefBuilder,EnumDef.EnumDefBuilder,InterfaceDef.InterfaceDefBuilder,RecordDef.RecordDefBuilder
public sealed class ObjectDefBuilder<ThisType>
extends AbstractElementBuilder<ThisType>
permits ClassDef.ClassDefBuilder, InterfaceDef.InterfaceDefBuilder, RecordDef.RecordDefBuilder, EnumDef.EnumDefBuilder
The abstract builder that is used for specific types: interfaces, classes, records or enums.
- Since:
- 1.3
- Author:
- Andriy Dmytruk
-
Field Summary
FieldsFields inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
annotations, javadoc, modifiers, name, synthetic, thisInstance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ThisTypeaddInnerType(@NonNull ObjectDef innerDef) Add an inner type.final ThisTypeaddInnerType(@NonNull Collection<ObjectDef> innerDefs) Add an inner types.final ThisTypeAdd a method.final ThisTypeaddMethods(@NonNull Collection<MethodDef> methods) Add methods.final ThisTypeaddProperty(@NonNull PropertyDef property) Add a property.final ThisTypeaddSuperinterface(@NonNull TypeDef superinterface) Add a super interface.final ThisTypeaddSuperinterfaces(@NonNull Collection<TypeDef> superinterfaces) Add super interfaces.Methods inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotations, addAnnotations, addJavadoc, addJavadoc, addModifiers, addModifiers, overrideModifiers, synthetic, synthetic
-
Field Details
-
methods
-
properties
-
superinterfaces
-
innerTypes
-
-
Constructor Details
-
ObjectDefBuilder
-
-
Method Details
-
addMethod
Add a method.- Parameters:
method- The method.- Returns:
- The builder
-
addMethods
Add methods.- Parameters:
methods- The method.s- Returns:
- The builder
-
addProperty
Add a property.- Parameters:
property- The property.- Returns:
- The builder
-
addSuperinterface
Add a super interface.- Parameters:
superinterface- The interface.- Returns:
- The builder
-
addSuperinterfaces
@NonNull public final ThisType addSuperinterfaces(@NonNull @NonNull Collection<TypeDef> superinterfaces) Add super interfaces.- Parameters:
superinterfaces- The interfaces.- Returns:
- The builder
-
addInnerType
Add an inner type.- Parameters:
innerDef- The inner definition.- Returns:
- The builder
-
addInnerType
Add an inner types.- Parameters:
innerDefs- The inner definitions.- Returns:
- The builder
-