Class OptionInfo.BuilderBase.OptionInfoImpl

java.lang.Object
io.helidon.builder.codegen.OptionInfo.BuilderBase.OptionInfoImpl
All Implemented Interfaces:
Prototype.Api, OptionInfo, Annotated
Enclosing class:
OptionInfo.BuilderBase<BUILDER extends OptionInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OptionInfo>

protected static class OptionInfo.BuilderBase.OptionInfoImpl extends Object implements OptionInfo
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • OptionInfoImpl

      protected OptionInfoImpl(OptionInfo.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • interfaceMethod

      public Optional<TypedElementInfo> interfaceMethod()
      Description copied from interface: OptionInfo
      Blueprint method if created from blueprint, or interface method if inherited from non-blueprint interface. Empty in case this is a "synthetic" option.
      Specified by:
      interfaceMethod in interface OptionInfo
      Returns:
      interface method, if present
    • declaringType

      public Optional<TypeInfo> declaringType()
      Description copied from interface: OptionInfo
      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.
      Specified by:
      declaringType in interface OptionInfo
      Returns:
      type that declares this option, if present
    • name

      public String name()
      Description copied from interface: OptionInfo
      Option name.
      Specified by:
      name in interface OptionInfo
      Returns:
      name of this option
    • getterName

      public String getterName()
      Description copied from interface: OptionInfo
      Name of the getter methods.
      Specified by:
      getterName in interface OptionInfo
      Returns:
      getter method name
    • setterName

      public String setterName()
      Description copied from interface: OptionInfo
      Name of the setter method(s).
      Specified by:
      setterName in interface OptionInfo
      Returns:
      setter method name
    • declaredType

      public TypeName declaredType()
      Description copied from interface: OptionInfo
      The return type of the blueprint method, or the type expected in getter of the option.
      Specified by:
      declaredType in interface OptionInfo
      Returns:
      declared type
    • decorator

      public Optional<TypeName> decorator()
      Description copied from interface: OptionInfo
      Option decorator type.
      Specified by:
      decorator in interface OptionInfo
      Returns:
      type of the option decorator, if present
    • includeInToString

      public boolean includeInToString()
      Description copied from interface: OptionInfo
      Whether to include this option in generated Object.toString() method.
      Specified by:
      includeInToString in interface OptionInfo
      Returns:
      whether to include in the toString method
    • includeInEqualsAndHashCode

      public boolean includeInEqualsAndHashCode()
      Description copied from interface: OptionInfo
      Whether to include this option in generated Object.equals(Object) and Object.hashCode() methods.
      Specified by:
      includeInEqualsAndHashCode in interface OptionInfo
      Returns:
      whether to include in the equals and hashCode methods
    • confidential

      public boolean confidential()
      Description copied from interface: OptionInfo
      Whether this option is confidential (i.e. we should not print the value in toString method).
      Specified by:
      confidential in interface OptionInfo
      Returns:
      whether this option is confidential
    • registryService

      public boolean registryService()
      Description copied from interface: OptionInfo
      Whether this option should be loaded from ServiceRegistry.
      Specified by:
      registryService in interface OptionInfo
      Returns:
      whether this option should be loaded from ServiceRegistry
    • sameGeneric

      public boolean sameGeneric()
      Description copied from interface: OptionInfo
      Whether this Map option is expected to have the same generic type for key and value. For example, for a Map<Class<?>, Instance<?>> that has sameGeneric set to true, we would generate singular method with signature <T> put(Class<T>, Instance<T>.
      Specified by:
      sameGeneric in interface OptionInfo
      Returns:
      whether a map has the same generic in key and value for a single mapping
    • required

      public boolean required()
      Description copied from interface: OptionInfo
      Whether this is a required option. Will be true if:
      • an Option.Required is present in blueprint
      • the return type on blueprint is not Optional or a collection, and we do not support null
      Specified by:
      required in interface OptionInfo
      Returns:
      whether the option is required
    • builderOptionOnly

      public boolean builderOptionOnly()
      Description copied from interface: OptionInfo
      Set to true if this option is only available on the builder. In such a case the prototype and implementation will not have this option.
      Specified by:
      builderOptionOnly in interface OptionInfo
      Returns:
      builder option only
    • qualifiers

      public List<Annotation> qualifiers()
      Description copied from interface: OptionInfo
      List of qualifiers for this option.
      Specified by:
      qualifiers in interface OptionInfo
      Returns:
      service registry qualifiers defined on this option (to be used when getting a service registry instance)
    • allowedValues

      public List<OptionAllowedValue> allowedValues()
      Description copied from interface: OptionInfo
      List of allowed values for this option.
      Specified by:
      allowedValues in interface OptionInfo
      Returns:
      allowed values
    • defaultValue

      public Optional<Consumer<ContentBuilder<?>>> defaultValue()
      Description copied from interface: OptionInfo
      Default value for this option, a consumer of the field content builder.
      Specified by:
      defaultValue in interface OptionInfo
      Returns:
      default value consumer
    • configured

      public Optional<OptionConfigured> configured()
      Description copied from interface: OptionInfo
      Details about configurability of this option.
      Specified by:
      configured in interface OptionInfo
      Returns:
      configured setup if configured
    • deprecation

      public Optional<OptionDeprecation> deprecation()
      Description copied from interface: OptionInfo
      Deprecation details.
      Specified by:
      deprecation in interface OptionInfo
      Returns:
      deprecation details, if present
    • provider

      public Optional<OptionProvider> provider()
      Description copied from interface: OptionInfo
      Provider details.
      Specified by:
      provider in interface OptionInfo
      Returns:
      provider details, if present
    • singular

      public Optional<OptionSingular> singular()
      Description copied from interface: OptionInfo
      Singular option details.
      Specified by:
      singular in interface OptionInfo
      Returns:
      singular setter name and related information, if present
    • accessModifier

      public AccessModifier accessModifier()
      Description copied from interface: OptionInfo
      Access modifier of generated setter methods on builder. Note that prototype methods are declared in an interface, so these must always be public.
      Specified by:
      accessModifier in interface OptionInfo
      Returns:
      access modifier to use
    • builderInfo

      public Optional<OptionBuilder> builderInfo()
      Description copied from interface: OptionInfo
      If the option has a builder, return its information.
      Specified by:
      builderInfo in interface OptionInfo
      Returns:
      builder information, if present
    • runtimeType

      public Optional<RuntimeTypeInfo> runtimeType()
      Description copied from interface: OptionInfo
      Custom runtime type factory method.
      Specified by:
      runtimeType in interface OptionInfo
      Returns:
      runtime type factory method, if present
    • description

      public Optional<String> description()
      Description copied from interface: OptionInfo
      Description of this option, used in Javadoc as the main text if defined.
      Specified by:
      description in interface OptionInfo
      Returns:
      description, if present
    • paramDescription

      public Optional<String> paramDescription()
      Description copied from interface: OptionInfo
      Parameter/return type description, used in Javadoc as the param/return description.
      Specified by:
      paramDescription in interface OptionInfo
      Returns:
      parameter description, if present
    • prototypedBy

      public Optional<TypeName> prototypedBy()
      Description copied from interface: OptionInfo
      A prototype that can build this option type.
      Specified by:
      prototypedBy in interface OptionInfo
      Returns:
      prototyped by type, or empty if not annotated
    • annotations

      public List<Annotation> annotations()
      Description copied from interface: Annotated
      List 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 the of the annotation).
      Specified by:
      annotations in interface Annotated
      Returns:
      the list of annotations declared on this element
    • inheritedAnnotations

      public List<Annotation> inheritedAnnotations()
      Description copied from interface: Annotated
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      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:
      inheritedAnnotations in interface Annotated
      Returns:
      list of all meta annotations of this element
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object