- All Superinterfaces:
Annotated,Prototype.Api
- All Known Implementing Classes:
PrototypeInfo.BuilderBase.PrototypeInfoImpl
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forPrototypeInfo.static classPrototypeInfo.BuilderBase<BUILDER extends PrototypeInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PrototypeInfo> Fluent API builder base forPrototypeInfo. -
Method Summary
Modifier and TypeMethodDescriptionAccess modifier for the generated prototype.Blueprint type info.static PrototypeInfo.Builderbuilder()Create a new fluent API builder to customize configuration.static PrototypeInfo.Builderbuilder(PrototypeInfo instance) Create a new fluent API builder from an existing instance.Access modifier for the generated builder.Javadoc for the builder base.Builder decorator, if configured.Javadoc for the builder class.Additional methods to be added to the prototype builder base.Factory methods to be used when mapping config to types.Prototype configuration details.Constants to be defined on the prototype.booleanWhether to create an emptycreate()method.A predicate to include possible interface default methods as options.Deprecated, for removal: This API element is subject to removal in a future version.booleanWhether to detach the blueprint from the generated prototype.javadoc()Javadoc for the generated prototype.Static factory methods to be added to the prototype.Additional methods to be added to the prototype as default methods.Type name of the generated prototype interface.Types the generated prototype should provide, if this prototype is/configures a service provider.booleanWhether to use record style or bean style accessors.booleanWhether to use the service registry to discover providers.If the builder should act as a factory for another type, this is the type.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.List of types the prototype should extend.Methods inherited from interface io.helidon.common.types.Annotated
allAnnotations, annotation, annotations, findAnnotation, hasAnnotation, inheritedAnnotations
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
blueprint
TypeInfo blueprint()Blueprint type info. A new prototype cannot be generated without a blueprint to base it on, so this is a required option.- Returns:
- blueprint type information
-
runtimeType
If the builder should act as a factory for another type, this is the type.Method
Prototype.Builder.buildPrototype()builds the prototype, while methodBuilder.build()builds the runtime type.- Returns:
- runtime type, if configured
-
javadoc
Javadoc javadoc()Javadoc for the generated prototype.- Returns:
- prototype javadoc
-
builderBaseJavadoc
Javadoc builderBaseJavadoc()Javadoc for the builder base.- Returns:
- builder base javadoc
-
builderJavadoc
Javadoc builderJavadoc()Javadoc for the builder class.- Returns:
- builder javadoc
-
builderDecorator
Builder decorator, if configured.- Returns:
- type of the builder decorator, if present
-
prototypeType
TypeName prototypeType()Type name of the generated prototype interface.This interface will contain the following inner classes:
BuilderBase- base of the builder with all setters, to support prototype inheritanceBuilder- builder extending the builder base that builds the prototype instance- implementation - prototype implementation class, supports inheritance as well
- Returns:
- type of the prototype interface
-
defaultMethodsPredicate
A predicate to include possible interface default methods as options. The default behavior is to exclude all default methods.Sequence of checking if a default method should be an option method:
- Check the method signature (i.e.
process(java.lang.String), if accepted, use it as an option - Check the method name (i.e.
process, if accepted, use it as an option - Otherwise the default method will not be an option
- Returns:
- predicate for method names
- Check the method signature (i.e.
-
accessModifier
AccessModifier accessModifier()Access modifier for the generated prototype.- Returns:
- access modifier, defaults to
public
-
builderAccessModifier
AccessModifier builderAccessModifier()Access modifier for the generated builder.- Returns:
- access modifier, defaults to
public
-
createEmptyCreate
boolean createEmptyCreate()Whether to create an emptycreate()method.- Returns:
- whether to create an empty
create()method, defaults totrue
-
recordStyle
boolean recordStyle()Whether to use record style or bean style accessors.Let's consider option
accessModifierof typeAccessModifier.Record style:
- Getter:
AccessModifier accessModifier() - Setter:
Builder accessModifier(AccessModifier)
- Getter:
AccessModifier getAccessModifier() - Setter:
Builder setAccessModifier(AccessModifier)
- Returns:
- whether to use record style accessors, defaults to
true
- Getter:
-
configured
Optional<PrototypeConfigured> configured()Prototype configuration details.- Returns:
- prototype configuration details, if configured
-
registrySupport
boolean registrySupport()Whether to use the service registry to discover providers.- Returns:
- whether to support service registry, defaults to
false
-
detachBlueprint
boolean detachBlueprint()Whether to detach the blueprint from the generated prototype.- Returns:
- true if the blueprint should not be extended by the prototype
-
superPrototype
If the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.- Returns:
- super prototype, if present
-
superTypes
List of types the prototype should extend. This list will always contain the blueprint interface, andPrototype.Api. This list also containssuperPrototype()if present.- Returns:
- types the prototype must extend
-
providerProvides
Types the generated prototype should provide, if this prototype is/configures a service provider.- Returns:
- provider provides types
-
constants
List<PrototypeConstant> constants()Constants to be defined on the prototype. A constant may be either a reference to another constant or a generated value.- Returns:
- constants to add to the prototype
-
prototypeMethods
List<GeneratedMethod> prototypeMethods()Additional methods to be added to the prototype as default methods.Non-default interface methods cannot be added, as the implementation is not customizable. This list does NOT contain option methods.
- Returns:
- custom methods to add to the prototype
-
builderMethods
List<GeneratedMethod> builderMethods()Additional methods to be added to the prototype builder base. It is your responsibility to ensure these methods do not conflict with option methods. This list does NOT contain option methods.- Returns:
- custom methods to add to the prototype builder base
-
deprecatedFactoryMethods
@Deprecated(since="4.4.0", forRemoval=true) List<DeprecatedFactoryMethod> deprecatedFactoryMethods()Deprecated, for removal: This API element is subject to removal in a future version.useprototypeFactories(), orruntimeTypeFactories(), orconfigFactories()instead, only present for backwards compatibilityStatic factory methods to be added to the prototype, or runtime type factory methods.This method exists only for backwards compatibility and will be removed in a future major version.
- Returns:
- a list of factory methods declared on the blueprint or a reference custom methods type
-
prototypeFactories
List<GeneratedMethod> prototypeFactories()Static factory methods to be added to the prototype.- Returns:
- a list of factory methods to add to the prototype
-
configFactories
List<FactoryMethod> configFactories()Factory methods to be used when mapping config to types. These methods will never be made public.Config factory methods may exist for a specific option, or for any option that matches the type.
- Returns:
- factory methods to use when mapping config to types
-
runtimeTypeFactories
List<RuntimeTypeInfo> runtimeTypeFactories()Factory methods to create runtime types from a builder. If a method is available for a specific option and matches its types, a setter with a parameter of consumer of the builder type will be added to the builder base.Runtime factory methods may exist for a specific option, or for any option that matches the type.
- Returns:
- factory methods to create runtime types from a builder
-
prototypeFactories(), orruntimeTypeFactories(), orconfigFactories()instead, only present for backwards compatibility