@Retention(value=RUNTIME) @Target(value=FIELD) @Documented public @interface Option
| Modifier and Type | Required Element and Description |
|---|---|
String[] |
name
An array of allowed command line parameters e.g.
|
| Modifier and Type | Optional Element and Description |
|---|---|
int |
arity
How many parameter values this option will consume.
|
String |
description
A description of this option.
|
boolean |
hidden
If true, this parameter won't appear in the usage().
|
boolean |
override
If true this parameter can override parameters of the same name (set via the
name() property)
declared by parent classes assuming the option definitions are compatible. |
boolean |
sealed
If true this parameter cannot be overridden by parameters of the same name declared in child classes regardless
of whether the child class declares the
override() property to be true |
String[] |
title
Name use to identify the option value in documentation and error messages
|
OptionType |
type
Is this a command, group or global option
|
Class<? extends TypeConverterProvider> |
typeConverterProvider
Sets an alternative type converter provider for the option.
|
public abstract String[] name
-n, --name, etc...public abstract OptionType type
public abstract String[] title
If your option has arity() greater than 1 then you can specify titles for each parameter by specifying
an array of titles. If there are fewer titles than the arity then the last title in the list will be used for all
subsequent options
public abstract String description
public abstract int arity
-pair value1 value2public abstract boolean hidden
public abstract boolean override
name() property)
declared by parent classes assuming the option definitions are compatible.
See OptionMetadata.override(java.util.Set, OptionMetadata, OptionMetadata) for legal overrides
Note that where the child option definition is an exact duplicate of the parent then overriding is implicitly permitted
public abstract boolean sealed
override() property to be truepublic abstract Class<? extends TypeConverterProvider> typeConverterProvider
Copyright © 2012–2022. All rights reserved.