OptionDescriptor
public final class OptionDescriptor- Inheritance
ObjectOptionDescriptor
Represents metadata for a single option.
Methods14
String getName()
OptionKey<?> getKey()
boolean isDeprecated()
isDeprecated
since 19.0public 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.0public String getDeprecationMessage()Returns the deprecation reason and the recommended fix. For newlines, use %n.
Returns
String- No description.
boolean isOptionMap()
isOptionMap
since 19.2public 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.0public OptionCategory getCategory()Returns the user category of this option.
Returns
OptionCategory- No description.
OptionStability getStability()
getStability
since 19.0public OptionStability getStability()Returns the stability of this option.
Returns
OptionStability- No description.
String getHelp()
String getUsageSyntax()
getUsageSyntax
since 22.1public 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.1public 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.
See also
String toString()Described in toString().
int hashCode()Described in hashCode().
boolean equals(Object)Described in equals(java.lang.Object).
equals
since 19.0public 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.0public 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.
Returns
OptionDescriptor.Builder- No description.
Nested types
public final class .BuilderRepresents an option descriptor builder.