Class OptionDescriptor
java.lang.Object
org.graalvm.options.OptionDescriptor
Represents metadata for a single option.
- Since:
- 19.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classRepresents an option descriptor builder. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the user category of this option.Returns the deprecation reason and the recommended fix.getHelp()Returns a human-readable description on how to use the option.OptionKey<?> getKey()Returns the key for this option.getName()Returns the name of the option that this descriptor represents.Returns the stability of this option.Specifies a human-readable syntax describing the accepted values for this option.inthashCode()booleanReturnstrueif this option is constant.booleanReturnstrueif this option was marked deprecated.booleanReturnstrueif this option is an option map.static <T> OptionDescriptor.BuildernewBuilder(OptionKey<T> key, String name) Creates a new option descriptor builder by key.toString()
-
Method Details
-
getName
-
getKey
-
isDeprecated
public boolean isDeprecated()Returnstrueif 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
Returns the deprecation reason and the recommended fix. For newlines, use%n.- Since:
- 20.1.0
-
isOptionMap
public boolean isOptionMap()Returnstrueif 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
-
getStability
-
getHelp
Returns a human-readable description on how to use the option. For newlines, use%n.- Since:
- 19.0
-
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
-
isConstant
public boolean isConstant()Returnstrueif 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, thedefault valueis used. Once set, calls toConstantOptionKey.getConstantValue()on astatic finalfield are eligible for constant folding by the GraalVM compiler, allowing dead branches to be eliminated.- Since:
- 25.1
- See Also:
-
toString
-
hashCode
-
equals
-
newBuilder
Creates a new option descriptor builder by key. The option group and name is inferred by the key.- Since:
- 19.0
-