Annotation Interface Configured


@Target(TYPE) @Inherited @Retention(CLASS) public @interface Configured
A configured class can load its values from configuration. There are two options for a supported type - either it is an interface/class with a public static X create(Config), or a builder class with a method public Builder config(Config). This annotation is used to provide IDE autocompletion, and to build documentation metadata using an annotation processor.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Description of this configured type.
    boolean
    This is a helper to workaround issues where multiple builders build the same type and they do not make sense standalone.
    Standalone configuration objects use a prefix to mark where Helidon expects them in the configuration tree.
    Class<?>[]
    Additional types this type provides.
    boolean
    Whether this is a root configuration object.
  • Element Details

    • root

      boolean root
      Whether this is a root configuration object. If set to false (default), the object is considered to be nested in another configuration. For example WebServer is a standalone configuration object, as it can be read directly from configuration. ThreadPoolSupplier is not standalone, as it can be used only as part of another object.
      Returns:
      whether this is a standalone configuration object
      Default:
      false
    • prefix

      String prefix
      Standalone configuration objects use a prefix to mark where Helidon expects them in the configuration tree.
      Returns:
      prefix of all configuration options
      Default:
      ""
    • ignoreBuildMethod

      boolean ignoreBuildMethod
      This is a helper to workaround issues where multiple builders build the same type and they do not make sense standalone. This will force the builder to be a separate configuration type and not part of the built type.
      Returns:
      true if build method should be ignored
      Default:
      false
    • description

      String description
      Description of this configured type. Only used if this is root(), or if provides() is not empty. Nested options use documentation defined on the parent type.
      Returns:
      description of this (root) node
      Default:
      ""
    • provides

      Class<?>[] provides
      Additional types this type provides. For example security expects a SecurityProvider - basic authentication provider is such a provider, so it can be marked to provide this type.
      Returns:
      types this configured type provides in addition to its qualified class name
      Default:
      {}