Annotation Interface Value


@Retention(RUNTIME) @Target(FIELD) public @interface Value
This annotation is used to mark a field for inclusion in the config schema. Fields without this annotation will not be included in the config file.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines a comment for the property.
    Defines an alternative name to use when serializing the property.
    Defines a link to an online resource the reader can reference when deciding the value of the property.
    boolean
    Should the default value be written to the config as a decorator? This should generally be disabled for objects and large arrays.
  • Element Details

    • name

      String name
      Defines an alternative name to use when serializing the property. This allows you to use names that do not comply with Java conventions like snake case in your file without using those names for your fields.
      Returns:
      The name to use for the property.
      Default:
      ""
    • comment

      String comment
      Defines a comment for the property. Long comments will automatically be wrapped when the comment is written.
      Returns:
      The comment to attach to the property.
      Default:
      ""
    • reference

      String reference
      Defines a link to an online resource the reader can reference when deciding the value of the property.
      Returns:
      A link to an online reference.
      Default:
      ""
    • writeDefault

      boolean writeDefault
      Should the default value be written to the config as a decorator? This should generally be disabled for objects and large arrays.
      Returns:
      If default values should be written.
      Default:
      true