@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface Opt
This used to be called Optional, but was renamed to avoid confusion with
Optional.
| Modifier and Type | Optional Element and Description |
|---|---|
@NotNull java.lang.String |
custom
The custom value that should be used if
value() is set to Opt.Type.CUSTOM. |
boolean |
treatErrorAsEmpty
Whether a parsing error should result in a
Opt.Type.EMPTY value instead of failing command execution. |
@NotNull Opt.Type |
value
The type of default value to use when the argument is not provided.
|
@NotNull public abstract @NotNull java.lang.String custom
value() is set to Opt.Type.CUSTOM.public abstract boolean treatErrorAsEmpty
Opt.Type.EMPTY value instead of failing command execution.
When true, unparseable arguments are treated as empty and errors are silently ignored.