public abstract class BaseArgument extends Object
apply(ArgumentList).| Modifier | Constructor and Description |
|---|---|
protected |
BaseArgument(String name,
String usage,
String defaultValue,
boolean repeated,
boolean required,
boolean hidden) |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
apply(ArgumentList args)
Try to apply to the argument.
|
String |
getDefaultValue()
A default value descriptor.
|
String |
getName()
The argument name.
|
abstract String |
getPrefix()
Prefix part of the usage usage message.
|
abstract String |
getSingleLineUsage()
Get the argument's single line usage string.
|
String |
getUsage()
The argument usage description.
|
boolean |
isHidden()
True if the argument should be hidden by default.
|
boolean |
isRepeated()
If the argument can be repeated (for arguments means to be multi-valued).
|
boolean |
isRequired()
If the argument is required (must be set).
|
abstract void |
validate()
Called on all the arguments after the parsing is done to validate
if all requirements have been passed.
|
public String getName()
public String getUsage()
public String getDefaultValue()
public boolean isRepeated()
public boolean isRequired()
public boolean isHidden()
public abstract String getSingleLineUsage()
public abstract String getPrefix()
public abstract void validate()
throws ArgumentException
ArgumentException if is did not validate with the appropriate
error message.ArgumentExceptionpublic abstract int apply(ArgumentList args)
args - The argument list.Copyright © 2016. All rights reserved.