Elide GraalVM25.6.0-elide.4
All types
Versions and modules

OptionDescriptor

Javaclassin org.graalvm.optionssince 19.0

public final class OptionDescriptor
Inheritance
  1. Object
  2. OptionDescriptor

Represents metadata for a single option.

Methods14

String getName()

getName

since 19.0
public String getName()

Returns the name of the option that this descriptor represents.

Returns

String
No description.
OptionKey<?> getKey()

getKey

since 19.0
public OptionKey<?> getKey()

Returns the key for this option.

Returns

OptionKey<?>
No description.
boolean isDeprecated()

isDeprecated

since 19.0
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.

Returns

boolean
No description.
String getDeprecationMessage()

getDeprecationMessage

since 20.1.0
public String getDeprecationMessage()

Returns the deprecation reason and the recommended fix. For newlines, use %n.

Returns

String
No description.
boolean isOptionMap()

isOptionMap

since 19.2
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.

Returns

boolean
No description.
OptionCategory getCategory()

getCategory

since 19.0
public OptionCategory getCategory()

Returns the user category of this option.

Returns

OptionCategory
No description.
OptionStability getStability()

getStability

since 19.0
public OptionStability getStability()

Returns the stability of this option.

Returns

OptionStability
No description.
String getHelp()

getHelp

since 19.0
public String getHelp()

Returns a human-readable description on how to use the option. For newlines, use %n.

Returns

String
No description.
String getUsageSyntax()

getUsageSyntax

since 22.1
public String getUsageSyntax()

Specifies a human-readable syntax describing the accepted values for this option.

Returns

String
null if no usage syntax should be used, the usage syntax otherwise
boolean isConstant()

isConstant

since 25.1
public boolean isConstant()

Returns true if this option is constant. Constant options value is static and final before the polyglot runtime is initialized and cannot be changed at runtime. The value is read from the system property -Dpolyglot.<option-name>=<value> during class initialization. If absent, the default value is used. Once set, calls to ConstantOptionKey.getConstantValue() on a static final field are eligible for constant folding by the GraalVM compiler, allowing dead branches to be eliminated.

Returns

boolean
No description.
String toString()Described in toString().

toString

since 19.0
public String toString()

Described in toString().

Returns

String
No description.
int hashCode()Described in hashCode().

hashCode

since 19.0
public int hashCode()

Described in hashCode().

Returns

int
No description.
boolean equals(Object)Described in equals(java.lang.Object).

equals

since 19.0
public boolean equals(Object obj)

Described in equals(java.lang.Object).

Parameters

objObject
No description.

Returns

boolean
No description.
static OptionDescriptor.Builder newBuilder(OptionKey<T>, String)

newBuilder

staticsince 19.0
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.

Parameters

keyOptionKey<T>
No description.
nameString
No description.

Returns

Nested types

Inherited members