Package org.yamcs
Class Spec.Option
java.lang.Object
org.yamcs.Spec.Option
- Enclosing class:
- Spec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
getSpec()
getTitle()
getType()
boolean
boolean
isHidden()
boolean
boolean
isSecret()
withAliases
(String... aliases) Add aliases for this option.withApplySpecDefaults
(boolean applySpecDefaults) In case thetype
is set toSpec.OptionType.MAP
, setting this property totrue
will cause defaults within elements of that type to be applied even if the option itself is not defined.<T extends Enum<T>>
Spec.OptionwithChoices
(Class<T> enumClass) Sets the allowed values of this option based on the states of an Enum.withChoices
(Object... choices) Sets the allowed values of this option.withDefault
(Object defaultValue) Sets the default value.withDeprecationMessage
(String deprecationMessage) Attach a deprecation message to this option.withDescription
(String... description) withElementType
(Spec.OptionType elementType) In case thetype
is set toSpec.OptionType.LIST
orSpec.OptionType.LIST_OR_ELEMENT
the element type indicates the type of each element of that list.withHidden
(boolean hidden) Hint that this option should be hidden from UIs.withRequired
(boolean required) Set whether this option is required.withSecret
(boolean secret) Set whether this option is secret.In case thetype
or theelementType
is set toSpec.OptionType.MAP
this specifies the options within that map.withVersionAdded
(String versionAdded) Which version of the software this specific option was added.
-
Constructor Details
-
Option
-
-
Method Details
-
getName
-
getType
-
isRequired
public boolean isRequired() -
isHidden
public boolean isHidden() -
isSecret
public boolean isSecret() -
getElementType
-
getTitle
-
getDescription
-
getVersionAdded
-
getDeprecationMessage
-
getChoices
-
getSpec
-
isApplySpecDefaults
public boolean isApplySpecDefaults() -
getDefaultValue
-
withTitle
-
withDescription
-
withRequired
Set whether this option is required. -
withHidden
Hint that this option should be hidden from UIs. -
withSecret
Set whether this option is secret. Secret options are not printed in log files. -
withDefault
Sets the default value. This is used only if the option is not required. -
withElementType
In case thetype
is set toSpec.OptionType.LIST
orSpec.OptionType.LIST_OR_ELEMENT
the element type indicates the type of each element of that list. -
withVersionAdded
Which version of the software this specific option was added. For example: "1.2.3". In plugins, this must be the plugin version, not the Yamcs version. -
withDeprecationMessage
Attach a deprecation message to this option. -
withChoices
Sets the allowed values of this option. -
withChoices
Sets the allowed values of this option based on the states of an Enum. -
withAliases
Add aliases for this option. During validation the alias will be converted to the real option name. -
withSpec
In case thetype
or theelementType
is set toSpec.OptionType.MAP
this specifies the options within that map. -
withApplySpecDefaults
In case thetype
is set toSpec.OptionType.MAP
, setting this property totrue
will cause defaults within elements of that type to be applied even if the option itself is not defined.Note that this is not a recursive property. You need to specify at every level if so required.
-