Package org.yamcs

Class Spec.Option

  • Enclosing class:
    Spec

    public static final class Spec.Option
    extends Object
    • Method Detail

      • getName

        public String getName()
      • isRequired

        public boolean isRequired()
      • isSecret

        public boolean isSecret()
      • getTitle

        public String getTitle()
      • getDescription

        public List<String> getDescription()
      • getDeprecationMessage

        public String getDeprecationMessage()
      • getSpec

        public Spec getSpec()
      • getDefaultValue

        public Object getDefaultValue()
      • withRequired

        public Spec.Option withRequired​(boolean required)
        Set whether this option is required.
      • withSecret

        public Spec.Option withSecret​(boolean secret)
        Set whether this option is secret. Secret options are not printed in log files.
      • withDefault

        public Spec.Option withDefault​(Object defaultValue)
        Sets the default value. This is used only if the option is not required.
      • withDeprecationMessage

        public Spec.Option withDeprecationMessage​(String deprecationMessage)
        Attach a deprecation message to this option.
      • withChoices

        public Spec.Option withChoices​(Object... choices)
        Sets the allowed values of this option.
      • withChoices

        public <T extends Enum<T>> Spec.Option withChoices​(Class<T> enumClass)
        Sets the allowed values of this option based on the states of an Enum.
      • withAliases

        public Spec.Option withAliases​(String... aliases)
        Add aliases for this option. During validation the alias will be converted to the real option name.
      • withApplySpecDefaults

        public Spec.Option withApplySpecDefaults​(boolean applySpecDefaults)
        In case the type is set to Spec.OptionType.MAP, setting this property to true 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.