Class OptionDescriptor

java.lang.Object
org.graalvm.options.OptionDescriptor

public final class OptionDescriptor extends Object
Represents metadata for a single option.
Since:
19.0
  • Method Details

    • getName

      public String getName()
      Returns the name of the option that this descriptor represents.
      Since:
      19.0
    • getKey

      public OptionKey<?> getKey()
      Returns the key for this option.
      Since:
      19.0
    • isDeprecated

      public boolean isDeprecated()
      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:
      19.0
    • getDeprecationMessage

      public String getDeprecationMessage()
      Returns the deprecation reason and the recommended fix. For newlines, use %n.
      Since:
      20.1.0
    • isOptionMap

      public boolean isOptionMap()
      Returns true if this option is an option map. Options maps allow to collect key=value pairs whose keys are unknown beforehand e.g. user defined properties.
      Since:
      19.2
    • getCategory

      public OptionCategory getCategory()
      Returns the user category of this option.
      Since:
      19.0
    • getStability

      public OptionStability getStability()
      Returns the stability of this option.
      Since:
      19.0
    • getHelp

      public String getHelp()
      Returns a human-readable description on how to use the option. For newlines, use %n.
      Since:
      19.0
    • getUsageSyntax

      public String getUsageSyntax()
      Specifies a human-readable syntax describing the accepted values for this option.
      Returns:
      null if no usage syntax should be used, the usage syntax otherwise
      Since:
      22.1
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      19.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Since:
      19.0
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      19.0
    • newBuilder

      public static <T> OptionDescriptor.Builder newBuilder(OptionKey<T> key, String name)
      Creates a new option descriptor builder by key. The option group and name is inferred by the key.
      Since:
      19.0