Interface RuntimeOptions.Descriptor

Enclosing class:
RuntimeOptions

public static interface RuntimeOptions.Descriptor
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts a string value, validates it, and converts it to an object of this type.
    Returns the default value of type valueType() for this option.
    boolean
    Returns true if this option was marked deprecated.
    Returns the deprecation reason and the recommended fix.
    Returns a human-readable description on how to use the option.
    Returns the name of the option that this descriptor represents.
    Returns the option type of this key.
  • Method Details

    • name

      String name()
      Returns the name of the option that this descriptor represents.
      Since:
      23.1
    • help

      String help()
      Returns a human-readable description on how to use the option. For newlines, use %n.
      Since:
      23.1
    • deprecated

      boolean deprecated()
      Returns true if this option was marked deprecated. This indicates that the option is going to be removed in a future release or its use is not recommended.
      Since:
      23.1
    • deprecatedMessage

      String deprecatedMessage()
      Returns the deprecation reason and the recommended fix. For newlines, use %n.
      Since:
      23.1
    • valueType

      Class<?> valueType()
      Returns the option type of this key. Typical values are String, Boolean, Integer. The result of convertValue(String) is guaranteed to be assignable to this type.
      Since:
      23.1
    • defaultValue

      Object defaultValue()
      Returns the default value of type valueType() for this option.
      Since:
      23.1
    • convertValue

      Object convertValue(String value) throws IllegalArgumentException
      Converts a string value, validates it, and converts it to an object of this type. For option maps includes the previous map stored for the option and the key.
      Throws:
      IllegalArgumentException - if the value is invalid or cannot be converted.
      Since:
      23.1