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 AbstractElementBuilder
annotations, javadoc, modifiers, name, synthetic, thisInstance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ThisTypeaddInnerType(ObjectDef innerDef) Add an inner type.final ThisTypeaddInnerType(Collection<ObjectDef> innerDefs) Add an inner types.final ThisTypeAdd a method.final ThisTypeaddMethods(Collection<MethodDef> methods) Add methods.final ThisTypeaddProperty(PropertyDef property) Add a property.final ThisTypeaddSuperinterface(TypeDef superinterface) Add a super interface.final ThisTypeaddSuperinterfaces(Collection<TypeDef> superinterfaces) Add super interfaces.Methods inherited from class 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
-
addMethods
Add methods.- Parameters:
methods- The method.s- Returns:
- The builder
-
addProperty
Add a property.- Parameters:
property- The property.- Returns:
- The builder
-
addSuperinterface
-
addSuperinterfaces
Add super interfaces.- Parameters:
superinterfaces- The interfaces.- Returns:
- The builder
-
addInnerType
-
addInnerType
Add an inner types.- Parameters:
innerDefs- The inner definitions.- Returns:
- The builder
-