- All Superinterfaces:
Annotated,Prototype.Api
- All Known Implementing Classes:
OptionInfo.BuilderBase.OptionInfoImpl
Model of a prototype/builder option.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forOptionInfo.static classOptionInfo.BuilderBase<BUILDER extends OptionInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends OptionInfo> Fluent API builder base forOptionInfo. -
Method Summary
Modifier and TypeMethodDescriptionAccess modifier of generated setter methods on builder.List of allowed values for this option.static OptionInfo.Builderbuilder()Create a new fluent API builder to customize configuration.static OptionInfo.Builderbuilder(OptionInfo instance) Create a new fluent API builder from an existing instance.If the option has a builder, return its information.booleanSet totrueif this option is only available on the builder.booleanWhether this option is confidential (i.e.Details about configurability of this option.The return type of the blueprint method, or the type expected in getter of the option.Type that declares this option.Option decorator type.Default value for this option, a consumer of the field content builder.Deprecation details.Description of this option, used in Javadoc as the main text if defined.Name of the getter methods.booleanWhether to include this option in generatedObject.equals(Object)andObject.hashCode()methods.booleanWhether to include this option in generatedObject.toString()method.Blueprint method if created from blueprint, or interface method if inherited from non-blueprint interface.name()Option name.Parameter/return type description, used in Javadoc as the param/return description.A prototype that can build this option type.provider()Provider details.List of qualifiers for this option.booleanWhether this option should be loaded fromServiceRegistry.booleanrequired()Whether this is a required option.Custom runtime type factory method.booleanWhether thisMapoption is expected to have the same generic type for key and value.Name of the setter method(s).singular()Singular option details.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
-
interfaceMethod
Optional<TypedElementInfo> interfaceMethod()Blueprint method if created from blueprint, or interface method if inherited from non-blueprint interface. Empty in case this is a "synthetic" option.- Returns:
- interface method, if present
-
declaringType
Type that declares this option. This may be the blueprint type, or an interface type. In case this is a "synthetic" option, there is not type to use.- Returns:
- type that declares this option, if present
-
name
String name()Option name.- Returns:
- name of this option
-
getterName
String getterName()Name of the getter methods.- Returns:
- getter method name
-
setterName
String setterName()Name of the setter method(s).- Returns:
- setter method name
-
declaredType
TypeName declaredType()The return type of the blueprint method, or the type expected in getter of the option.- Returns:
- declared type
-
decorator
Option decorator type.- Returns:
- type of the option decorator, if present
-
includeInToString
boolean includeInToString()Whether to include this option in generatedObject.toString()method.- Returns:
- whether to include in the
toStringmethod
-
includeInEqualsAndHashCode
boolean includeInEqualsAndHashCode()Whether to include this option in generatedObject.equals(Object)andObject.hashCode()methods.- Returns:
- whether to include in the
equalsandhashCodemethods
-
confidential
boolean confidential()Whether this option is confidential (i.e. we should not print the value intoStringmethod).- Returns:
- whether this option is confidential
-
registryService
boolean registryService()Whether this option should be loaded fromServiceRegistry.- Returns:
- whether this option should be loaded from
ServiceRegistry
-
sameGeneric
boolean sameGeneric()Whether thisMapoption is expected to have the same generic type for key and value. For example, for aMap<Class<?>, Instance<?>>that hassameGenericset totrue, we would generate singular method with signature<T> put(Class<T>, Instance<T>.- Returns:
- whether a map has the same generic in key and value for a single mapping
-
required
boolean required()Whether this is a required option. Will be true if:- an
Option.Requiredis present in blueprint - the return type on blueprint is not
Optionalor a collection, and we do not support null
- Returns:
- whether the option is required
- an
-
builderOptionOnly
boolean builderOptionOnly()Set totrueif this option is only available on the builder. In such a case the prototype and implementation will not have this option.- Returns:
- builder option only
-
qualifiers
List<Annotation> qualifiers()List of qualifiers for this option.- Returns:
- service registry qualifiers defined on this option (to be used when getting a service registry instance)
-
allowedValues
List<OptionAllowedValue> allowedValues()List of allowed values for this option.- Returns:
- allowed values
-
defaultValue
Optional<Consumer<ContentBuilder<?>>> defaultValue()Default value for this option, a consumer of the field content builder.- Returns:
- default value consumer
-
configured
Optional<OptionConfigured> configured()Details about configurability of this option.- Returns:
- configured setup if configured
-
deprecation
Optional<OptionDeprecation> deprecation()Deprecation details.- Returns:
- deprecation details, if present
-
provider
Optional<OptionProvider> provider()Provider details.- Returns:
- provider details, if present
-
singular
Optional<OptionSingular> singular()Singular option details.- Returns:
- singular setter name and related information, if present
-
accessModifier
AccessModifier accessModifier()Access modifier of generated setter methods on builder. Note that prototype methods are declared in an interface, so these must always be public.- Returns:
- access modifier to use
-
builderInfo
Optional<OptionBuilder> builderInfo()If the option has a builder, return its information.- Returns:
- builder information, if present
-
runtimeType
Optional<RuntimeTypeInfo> runtimeType()Custom runtime type factory method.- Returns:
- runtime type factory method, if present
-
description
Description of this option, used in Javadoc as the main text if defined.- Returns:
- description, if present
-
paramDescription
Parameter/return type description, used in Javadoc as the param/return description.- Returns:
- parameter description, if present
-
prototypedBy
A prototype that can build this option type.- Returns:
- prototyped by type, or empty if not annotated
-