Class PrototypeInfo.Builder
java.lang.Object
io.helidon.builder.codegen.PrototypeInfo.BuilderBase<PrototypeInfo.Builder, PrototypeInfo>
io.helidon.builder.codegen.PrototypeInfo.Builder
- All Implemented Interfaces:
Prototype.Builder<PrototypeInfo.Builder, PrototypeInfo>, Builder<PrototypeInfo.Builder, PrototypeInfo>, Supplier<PrototypeInfo>
- Enclosing interface:
PrototypeInfo
public static class PrototypeInfo.Builder
extends PrototypeInfo.BuilderBase<PrototypeInfo.Builder, PrototypeInfo>
implements Builder<PrototypeInfo.Builder, PrototypeInfo>
Fluent API builder for
PrototypeInfo.-
Nested Class Summary
Nested classes/interfaces inherited from class PrototypeInfo.BuilderBase
PrototypeInfo.BuilderBase.PrototypeInfoImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Methods inherited from class PrototypeInfo.BuilderBase
accessModifier, accessModifier, addAnnotation, addAnnotation, addAnnotations, addBuilderMethod, addBuilderMethod, addBuilderMethods, addConfigFactories, addConfigFactory, addConfigFactory, addConstant, addConstant, addConstants, addInheritedAnnotation, addInheritedAnnotation, addInheritedAnnotations, addPrototypeFactories, addPrototypeFactory, addPrototypeFactory, addPrototypeMethod, addPrototypeMethod, addPrototypeMethods, addProviderProvide, addProviderProvide, addProviderProvides, addRuntimeTypeFactories, addRuntimeTypeFactory, addRuntimeTypeFactory, addSuperType, addSuperType, addSuperTypes, annotations, annotations, blueprint, blueprint, blueprint, blueprint, builderAccessModifier, builderAccessModifier, builderBaseJavadoc, builderBaseJavadoc, builderBaseJavadoc, builderBaseJavadoc, builderDecorator, builderDecorator, builderDecorator, builderDecorator, builderJavadoc, builderJavadoc, builderJavadoc, builderJavadoc, builderMethods, builderMethods, clearAnnotations, clearBuilderDecorator, clearBuilderMethods, clearConfigFactories, clearConfigured, clearConstants, clearInheritedAnnotations, clearPrototypeFactories, clearPrototypeMethods, clearProviderProvides, clearRuntimeType, clearRuntimeTypeFactories, clearSuperPrototype, clearSuperTypes, configFactories, configFactories, configured, configured, configured, configured, constants, constants, createEmptyCreate, createEmptyCreate, defaultMethodsPredicate, defaultMethodsPredicate, detachBlueprint, detachBlueprint, from, from, inheritedAnnotations, inheritedAnnotations, javadoc, javadoc, javadoc, javadoc, preBuildPrototype, prototypeFactories, prototypeFactories, prototypeMethods, prototypeMethods, prototypeType, prototypeType, prototypeType, prototypeType, providerProvides, providerProvides, recordStyle, recordStyle, registrySupport, registrySupport, runtimeType, runtimeType, runtimeType, runtimeType, runtimeTypeFactories, runtimeTypeFactories, superPrototype, superPrototype, superPrototype, superPrototype, superTypes, superTypes, toString, validatePrototypeModifier and TypeMethodDescriptionAccess modifier for the generated prototype.accessModifier(AccessModifier accessModifier) Access modifier for the generated prototype.addAnnotation(Annotation annotation) Annotations option.addAnnotation(Consumer<Annotation.Builder> consumer) Annotations option.addAnnotations(List<? extends Annotation> annotations) Annotations option.addBuilderMethod(GeneratedMethod builderMethod) Additional methods to be added to the prototype builder base.addBuilderMethod(Consumer<GeneratedMethod.Builder> consumer) Additional methods to be added to the prototype builder base.addBuilderMethods(List<? extends GeneratedMethod> builderMethods) Additional methods to be added to the prototype builder base.addConfigFactories(List<? extends FactoryMethod> configFactories) Factory methods to be used when mapping config to types.addConfigFactory(FactoryMethod configFactory) Factory methods to be used when mapping config to types.addConfigFactory(Consumer<FactoryMethod.Builder> consumer) Factory methods to be used when mapping config to types.addConstant(PrototypeConstant constant) Constants to be defined on the prototype.addConstant(Consumer<PrototypeConstant.Builder> consumer) Constants to be defined on the prototype.addConstants(List<? extends PrototypeConstant> constants) Constants to be defined on the prototype.addInheritedAnnotation(Annotation inheritedAnnotation) InheritedAnnotations option.addInheritedAnnotation(Consumer<Annotation.Builder> consumer) InheritedAnnotations option.addInheritedAnnotations(List<? extends Annotation> inheritedAnnotations) InheritedAnnotations option.addPrototypeFactories(List<? extends GeneratedMethod> prototypeFactories) Static factory methods to be added to the prototype.addPrototypeFactory(GeneratedMethod prototypeFactory) Static factory methods to be added to the prototype.addPrototypeFactory(Consumer<GeneratedMethod.Builder> consumer) Static factory methods to be added to the prototype.addPrototypeMethod(GeneratedMethod prototypeMethod) Additional methods to be added to the prototype as default methods.addPrototypeMethod(Consumer<GeneratedMethod.Builder> consumer) Additional methods to be added to the prototype as default methods.addPrototypeMethods(List<? extends GeneratedMethod> prototypeMethods) Additional methods to be added to the prototype as default methods.addProviderProvide(TypeName providerProvide) Types the generated prototype should provide, if this prototype is/configures a service provider.addProviderProvide(Consumer<TypeName.Builder> consumer) Types the generated prototype should provide, if this prototype is/configures a service provider.addProviderProvides(Set<? extends TypeName> providerProvides) Types the generated prototype should provide, if this prototype is/configures a service provider.addRuntimeTypeFactories(List<? extends RuntimeTypeInfo> runtimeTypeFactories) Factory methods to create runtime types from a builder.addRuntimeTypeFactory(RuntimeTypeInfo runtimeTypeFactory) Factory methods to create runtime types from a builder.addRuntimeTypeFactory(Consumer<RuntimeTypeInfo.Builder> consumer) Factory methods to create runtime types from a builder.addSuperType(TypeName superType) List of types the prototype should extend.addSuperType(Consumer<TypeName.Builder> consumer) List of types the prototype should extend.addSuperTypes(Set<? extends TypeName> superTypes) List of types the prototype should extend.Annotations option.annotations(List<? extends Annotation> annotations) Annotations option.Blueprint type info.Blueprint type info.blueprint(Consumer<TypeInfo.Builder> consumer) Blueprint type info.Blueprint type info.Access modifier for the generated builder.builderAccessModifier(AccessModifier builderAccessModifier) Access modifier for the generated builder.Javadoc for the builder base.builderBaseJavadoc(Javadoc builderBaseJavadoc) Javadoc for the builder base.builderBaseJavadoc(Consumer<Javadoc.Builder> consumer) Javadoc for the builder base.builderBaseJavadoc(Supplier<? extends Javadoc> supplier) Javadoc for the builder base.Builder decorator, if configured.builderDecorator(TypeName builderDecorator) Builder decorator, if configured.builderDecorator(Consumer<TypeName.Builder> consumer) Builder decorator, if configured.builderDecorator(Supplier<? extends TypeName> supplier) Builder decorator, if configured.Javadoc for the builder class.builderJavadoc(Javadoc builderJavadoc) Javadoc for the builder class.builderJavadoc(Consumer<Javadoc.Builder> consumer) Javadoc for the builder class.builderJavadoc(Supplier<? extends Javadoc> supplier) Javadoc for the builder class.Additional methods to be added to the prototype builder base.builderMethods(List<? extends GeneratedMethod> builderMethods) Additional methods to be added to the prototype builder base.Clear all annotations.Clear existing value of builderDecorator.Clear all builderMethods.Clear all configFactories.Clear existing value of configured.Clear all constants.Clear all inheritedAnnotations.Clear all prototypeFactories.Clear all prototypeMethods.Clear all providerProvides.Clear existing value of runtimeType.Clear all runtimeTypeFactories.Clear existing value of superPrototype.Clear all superTypes.Factory methods to be used when mapping config to types.configFactories(List<? extends FactoryMethod> configFactories) Factory methods to be used when mapping config to types.Prototype configuration details.configured(PrototypeConfigured configured) Prototype configuration details.configured(Consumer<PrototypeConfigured.Builder> consumer) Prototype configuration details.configured(Supplier<? extends PrototypeConfigured> supplier) Prototype configuration details.Constants to be defined on the prototype.constants(List<? extends PrototypeConstant> constants) Constants to be defined on the prototype.booleanWhether to create an emptycreate()method.createEmptyCreate(boolean createEmptyCreate) Whether to create an emptycreate()method.A predicate to include possible interface default methods as options.defaultMethodsPredicate(Predicate<String> defaultMethodsPredicate) A predicate to include possible interface default methods as options.booleanWhether to detach the blueprint from the generated prototype.detachBlueprint(boolean detachBlueprint) Whether to detach the blueprint from the generated prototype.from(PrototypeInfo prototype) Update this builder from an existing prototype instance.from(PrototypeInfo.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.InheritedAnnotations option.inheritedAnnotations(List<? extends Annotation> inheritedAnnotations) InheritedAnnotations option.javadoc()Javadoc for the generated prototype.Javadoc for the generated prototype.javadoc(Consumer<Javadoc.Builder> consumer) Javadoc for the generated prototype.Javadoc for the generated prototype.protected voidHandles providers and decorators.Static factory methods to be added to the prototype.prototypeFactories(List<? extends GeneratedMethod> prototypeFactories) Static factory methods to be added to the prototype.Additional methods to be added to the prototype as default methods.prototypeMethods(List<? extends GeneratedMethod> prototypeMethods) Additional methods to be added to the prototype as default methods.Type name of the generated prototype interface.prototypeType(TypeName prototypeType) Type name of the generated prototype interface.prototypeType(Consumer<TypeName.Builder> consumer) Type name of the generated prototype interface.prototypeType(Supplier<? extends TypeName> supplier) Type name of the generated prototype interface.Types the generated prototype should provide, if this prototype is/configures a service provider.providerProvides(Set<? extends TypeName> providerProvides) Types the generated prototype should provide, if this prototype is/configures a service provider.booleanWhether to use record style or bean style accessors.recordStyle(boolean recordStyle) Whether to use record style or bean style accessors.booleanWhether to use the service registry to discover providers.registrySupport(boolean registrySupport) Whether to use the service registry to discover providers.If the builder should act as a factory for another type, this is the type.runtimeType(TypeName runtimeType) If the builder should act as a factory for another type, this is the type.runtimeType(Consumer<TypeName.Builder> consumer) If the builder should act as a factory for another type, this is the type.runtimeType(Supplier<? extends TypeName> supplier) If the builder should act as a factory for another type, this is the type.Factory methods to create runtime types from a builder.runtimeTypeFactories(List<? extends RuntimeTypeInfo> runtimeTypeFactories) Factory methods to create runtime types from a builder.If the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.superPrototype(TypeName superPrototype) If the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.superPrototype(Consumer<TypeName.Builder> consumer) If the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.superPrototype(Supplier<? extends TypeName> supplier) If the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.List of types the prototype should extend.superTypes(Set<? extends TypeName> superTypes) List of types the prototype should extend.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault PrototypeInfoget()default PrototypeInfo.Builderidentity()Instance of this builder as the correct type.default PrototypeInfo.Builderupdate(Consumer<PrototypeInfo.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault PrototypeInfo.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Description copied from interface:Prototype.BuilderCreate an instance of thePrototype. This method is available on all generated builders forPrototype.Blueprint.Calling this method may update the builder from providers and decorators, so repeated calls may have side effects such as repeated provider discovery.
- Specified by:
buildPrototypein interfacePrototype.Builder<PrototypeInfo.Builder, PrototypeInfo>- Returns:
- an instance of the setup object created from this builder
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<PrototypeInfo.Builder, PrototypeInfo>- Returns:
- instance of the built type
-