Class InnerClass.Builder
java.lang.Object
io.helidon.codegen.classmodel.ClassBase.Builder<InnerClass.Builder, InnerClass>
io.helidon.codegen.classmodel.InnerClass.Builder
- All Implemented Interfaces:
Builder<InnerClass.Builder, InnerClass>, Supplier<InnerClass>
- Enclosing class:
InnerClass
public static final class InnerClass.Builder
extends ClassBase.Builder<InnerClass.Builder, InnerClass>
Fluent API builder for
InnerClass.-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(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.description(String description) description(List<String> description) includeImport(boolean includeImport) Whether to include import type information among the imports.isStatic(boolean isStatic) Methods inherited from class ClassBase.Builder
accessModifier, addConstructor, addConstructor, addEnumConstant, addField, addField, addField, addGenericArgument, addGenericArgument, addImport, addImport, addImport, addInnerClass, addInnerClass, addInnerClass, addInterface, addInterface, addInterface, addJavadocTag, addMethod, addMethod, addMethod, addPermittedSubclass, addPermittedSubclass, addPermittedSubclass, addStaticImport, classType, isAbstract, isFinal, javadoc, sealed, sortFields, sortStaticFields, superType, superType, superTypeModifier and TypeMethodDescriptionaccessModifier(AccessModifier accessModifier) addConstructor(Constructor.Builder constructor) Add new constructor to this class.addConstructor(Consumer<Constructor.Builder> consumer) Add new constructor to this class.addEnumConstant(Consumer<EnumConstant.Builder> builderConsumer) Add an enum constant (only valid if the class type is set to ENUM.Add new field to the type.addField(Field.Builder builder) Add new field to the type.addField(Consumer<Field.Builder> consumer) Add new field to the type.addGenericArgument(TypeArgument typeArgument) Add generic argument type.addGenericArgument(Consumer<TypeArgument.Builder> consumer) Add generic argument type.Add specific fully qualified type name to be imported.Add specific class to be imported.Add specific fully qualified type name to be imported.addInnerClass(InnerClass innerClass) Add new inner type to this type.addInnerClass(Consumer<InnerClass.Builder> consumer) Add new inner type to this type.addInnerClass(Supplier<InnerClass> supplier) Add new inner type to this type.addInterface(TypeName interfaceType) Add interface this type should implement.addInterface(Class<?> interfaceType) Add interface this type should implement.addInterface(String interfaceName) Add interface this type should implement.addJavadocTag(String tag, String description) Add new method to the type.addMethod(Method.Builder builder) Add new method to the type.addMethod(Consumer<Method.Builder> consumer) Add new method to the type.addPermittedSubclass(TypeName permittedSubclass) Add a permitted direct subclass of this sealed type.addPermittedSubclass(Class<?> permittedSubclass) Add a permitted direct subclass of this sealed type.addPermittedSubclass(String permittedSubclass) Add a permitted direct subclass of this sealed type.addStaticImport(String staticImport) Add specific static import.classType(ElementKind kind) Type of the Java type we are creating.isAbstract(boolean isAbstract) Whether this type is abstract.isFinal(boolean isFinal) Whether this type is final.sealed(boolean sealed) Whether this type is sealed.sortFields(boolean sort) Whether to sort non-static fields by type and name (defaults totrue).sortStaticFields(boolean sort) Whether to sort static fields by type and name (defaults totrue).Set new super type of this type.Set new super type of this type.Set new fully qualified super type name of this type.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault InnerClassget()default InnerClass.Builderidentity()Instance of this builder as the correct type.default InnerClass.Builderupdate(Consumer<InnerClass.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Returns:
- instance of the built type
-
isStatic
-
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
-
name
-
includeImport
Whether to include import type information among the imports.- Parameters:
includeImport- whether imports should be included- Returns:
- updated builder instance
-