Class PrototypeInfo.BuilderBase.PrototypeInfoImpl
- All Implemented Interfaces:
Prototype.Api,PrototypeInfo,Annotated
- Enclosing class:
PrototypeInfo.BuilderBase<BUILDER extends PrototypeInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PrototypeInfo>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.builder.codegen.PrototypeInfo
PrototypeInfo.Builder, PrototypeInfo.BuilderBase<BUILDER extends PrototypeInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PrototypeInfo> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrototypeInfoImpl(PrototypeInfo.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionAccess modifier for the generated prototype.List of declared and known annotations for this element.Blueprint type info.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.booleaninthashCode()List of all inherited annotations for this element.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.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.common.types.Annotated
allAnnotations, annotation, findAnnotation, hasAnnotation
-
Constructor Details
-
PrototypeInfoImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
blueprint
Description copied from interface:PrototypeInfoBlueprint type info. A new prototype cannot be generated without a blueprint to base it on, so this is a required option.- Specified by:
blueprintin interfacePrototypeInfo- Returns:
- blueprint type information
-
runtimeType
Description copied from interface:PrototypeInfoIf 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.- Specified by:
runtimeTypein interfacePrototypeInfo- Returns:
- runtime type, if configured
-
javadoc
Description copied from interface:PrototypeInfoJavadoc for the generated prototype.- Specified by:
javadocin interfacePrototypeInfo- Returns:
- prototype javadoc
-
builderBaseJavadoc
Description copied from interface:PrototypeInfoJavadoc for the builder base.- Specified by:
builderBaseJavadocin interfacePrototypeInfo- Returns:
- builder base javadoc
-
builderJavadoc
Description copied from interface:PrototypeInfoJavadoc for the builder class.- Specified by:
builderJavadocin interfacePrototypeInfo- Returns:
- builder javadoc
-
builderDecorator
Description copied from interface:PrototypeInfoBuilder decorator, if configured.- Specified by:
builderDecoratorin interfacePrototypeInfo- Returns:
- type of the builder decorator, if present
-
prototypeType
Description copied from interface:PrototypeInfoType 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
- Specified by:
prototypeTypein interfacePrototypeInfo- Returns:
- type of the prototype interface
-
defaultMethodsPredicate
Description copied from interface:PrototypeInfoA 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
- Specified by:
defaultMethodsPredicatein interfacePrototypeInfo- Returns:
- predicate for method names
- Check the method signature (i.e.
-
accessModifier
Description copied from interface:PrototypeInfoAccess modifier for the generated prototype.- Specified by:
accessModifierin interfacePrototypeInfo- Returns:
- access modifier, defaults to
public
-
builderAccessModifier
Description copied from interface:PrototypeInfoAccess modifier for the generated builder.- Specified by:
builderAccessModifierin interfacePrototypeInfo- Returns:
- access modifier, defaults to
public
-
createEmptyCreate
public boolean createEmptyCreate()Description copied from interface:PrototypeInfoWhether to create an emptycreate()method.- Specified by:
createEmptyCreatein interfacePrototypeInfo- Returns:
- whether to create an empty
create()method, defaults totrue
-
recordStyle
public boolean recordStyle()Description copied from interface:PrototypeInfoWhether 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)
- Specified by:
recordStylein interfacePrototypeInfo- Returns:
- whether to use record style accessors, defaults to
true
- Getter:
-
configured
Description copied from interface:PrototypeInfoPrototype configuration details.- Specified by:
configuredin interfacePrototypeInfo- Returns:
- prototype configuration details, if configured
-
registrySupport
public boolean registrySupport()Description copied from interface:PrototypeInfoWhether to use the service registry to discover providers.- Specified by:
registrySupportin interfacePrototypeInfo- Returns:
- whether to support service registry, defaults to
false
-
detachBlueprint
public boolean detachBlueprint()Description copied from interface:PrototypeInfoWhether to detach the blueprint from the generated prototype.- Specified by:
detachBlueprintin interfacePrototypeInfo- Returns:
- true if the blueprint should not be extended by the prototype
-
superPrototype
Description copied from interface:PrototypeInfoIf the blueprint extends an existing prototype (or blueprint), we must extend that prototype and also that prototype's builder.- Specified by:
superPrototypein interfacePrototypeInfo- Returns:
- super prototype, if present
-
superTypes
Description copied from interface:PrototypeInfoList of types the prototype should extend. This list will always contain the blueprint interface, andPrototype.Api. This list also containsPrototypeInfo.superPrototype()if present.- Specified by:
superTypesin interfacePrototypeInfo- Returns:
- types the prototype must extend
-
providerProvides
Description copied from interface:PrototypeInfoTypes the generated prototype should provide, if this prototype is/configures a service provider.- Specified by:
providerProvidesin interfacePrototypeInfo- Returns:
- provider provides types
-
constants
Description copied from interface:PrototypeInfoConstants to be defined on the prototype. A constant may be either a reference to another constant or a generated value.- Specified by:
constantsin interfacePrototypeInfo- Returns:
- constants to add to the prototype
-
prototypeMethods
Description copied from interface:PrototypeInfoAdditional 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.
- Specified by:
prototypeMethodsin interfacePrototypeInfo- Returns:
- custom methods to add to the prototype
-
builderMethods
Description copied from interface:PrototypeInfoAdditional 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.- Specified by:
builderMethodsin interfacePrototypeInfo- Returns:
- custom methods to add to the prototype builder base
-
deprecatedFactoryMethods
@Deprecated(since="4.4.0", forRemoval=true) public List<DeprecatedFactoryMethod> deprecatedFactoryMethods()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PrototypeInfoStatic 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.
- Specified by:
deprecatedFactoryMethodsin interfacePrototypeInfo- Returns:
- a list of factory methods declared on the blueprint or a reference custom methods type
-
prototypeFactories
Description copied from interface:PrototypeInfoStatic factory methods to be added to the prototype.- Specified by:
prototypeFactoriesin interfacePrototypeInfo- Returns:
- a list of factory methods to add to the prototype
-
configFactories
Description copied from interface:PrototypeInfoFactory 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.
- Specified by:
configFactoriesin interfacePrototypeInfo- Returns:
- factory methods to use when mapping config to types
-
runtimeTypeFactories
Description copied from interface:PrototypeInfoFactory 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.
- Specified by:
runtimeTypeFactoriesin interfacePrototypeInfo- Returns:
- factory methods to create runtime types from a builder
-
annotations
Description copied from interface:AnnotatedList of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation).- Specified by:
annotationsin interfaceAnnotated- Returns:
- the list of annotations declared on this element
-
inheritedAnnotations
Description copied from interface:AnnotatedList of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited.The returned list does not contain
Annotated.annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.This method does not return annotations on super types or interfaces!
- Specified by:
inheritedAnnotationsin interfaceAnnotated- Returns:
- list of all meta annotations of this element
-
toString
-
equals
-
hashCode
public int hashCode()
-