java.lang.Object
io.helidon.codegen.classmodel.ClassBase.Builder<ClassModel.Builder,ClassModel>
io.helidon.codegen.classmodel.ClassModel.Builder
- All Implemented Interfaces:
Builder<ClassModel.Builder,
,ClassModel> Supplier<ClassModel>
- Enclosing class:
ClassModel
public static final class ClassModel.Builder
extends ClassBase.Builder<ClassModel.Builder,ClassModel>
Fluent API builder for
ClassModel
.-
Method Summary
Modifier and TypeMethodDescriptionaccessModifier
(AccessModifier accessModifier) addAnnotation
(Annotation annotation) Add new annotation to the component.addAnnotation
(Annotation.Builder builder) Add new annotation to the component.addAnnotation
(Annotation annotation) Add new annotation to the component.addAnnotation
(Consumer<Annotation.Builder> consumer) Add new annotation to the component.addDescriptionLine
(String line) build()
Build the instance from this builder.Copyright header to be used.description
(String description) description
(List<String> description) Find if the provided type name is handled as part of this generated class.includeImport
(boolean includeImport) Whether to include import type information among the imports.packageName
(String packageName) Package name of this type.Methods inherited from class io.helidon.codegen.classmodel.ClassBase.Builder
addConstructor, addConstructor, addField, addField, addField, addGenericArgument, addGenericArgument, addImport, addImport, addImport, addInnerClass, addInnerClass, addInnerClass, addInterface, addInterface, addInterface, addJavadocTag, addMethod, addMethod, addMethod, addStaticImport, classType, classType, isAbstract, isFinal, javadoc, sortFields, sortStaticFields, superType, superType, superType
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Returns:
- instance of the built type
-
accessModifier
- Overrides:
accessModifier
in classClassBase.Builder<ClassModel.Builder,
ClassModel>
-
packageName
Package name of this type.- Parameters:
packageName
- type package name- Returns:
- updated builder instance
-
copyright
Copyright header to be used.- Parameters:
copyright
- copyright header- Returns:
- updated builder instance
-
name
-
type
-
find
Find if the provided type name is handled as part of this generated class.- Parameters:
typeName
- type name to look for- Returns:
- class base that matches the provided type name
-
description
-
description
-
addDescriptionLine
-
addAnnotation
Add new annotation to the component.- Parameters:
annotation
- annotation instance- Returns:
- updated builder instance
-
addAnnotation
Add new annotation to the component.- Parameters:
consumer
- annotation builder consumer- Returns:
- updated builder instance
-
addAnnotation
Add new annotation to the component.- Parameters:
builder
- annotation builder- Returns:
- updated builder instance
-
addAnnotation
Add new annotation to the component.- Parameters:
annotation
- annotation instance- Returns:
- updated builder instance
-
includeImport
Whether to include import type information among the imports.- Parameters:
includeImport
- whether imports should be included- Returns:
- updated builder instance
-