public static interface RuntimeOptions.Descriptor
Modifier and Type | Method and Description |
---|---|
Object |
convertValue(String value)
Converts a string value, validates it, and converts it to an object of this type.
|
Object |
defaultValue()
Returns the default value of type
RuntimeOptions.Descriptor.valueType() for this option. |
boolean |
deprecated()
Returns
true if this option was marked deprecated. |
String |
deprecatedMessage()
Returns the deprecation reason and the recommended fix.
|
String |
help()
Returns a human-readable description on how to use the option.
|
String |
name()
Returns the name of the option that this descriptor represents.
|
Class<?> |
valueType()
Returns the option type of this key.
|
String name()
String help()
%n
.boolean deprecated()
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.String deprecatedMessage()
%n
.Class<?> valueType()
String
, Boolean
,
Integer
. The result of RuntimeOptions.Descriptor.convertValue(String)
is guaranteed to be
assignable to this type.Object defaultValue()
RuntimeOptions.Descriptor.valueType()
for this option.Object convertValue(String value) throws IllegalArgumentException
IllegalArgumentException
- if the value is invalid or cannot be converted.