public class Property extends BaseOption
| Modifier and Type | Class and Description |
|---|---|
static interface |
Property.Putter
Basic interface for putting value onto a map, properties or config.
|
| Constructor and Description |
|---|
Property(char shortName,
String usage,
Property.Putter properties)
Create a property argument with default key and value names.
|
Property(char shortName,
String metaKey,
String metaVar,
String usage,
Property.Putter properties)
Create a property argument.
|
Property(char shortName,
String metaKey,
String metaVar,
String usage,
Property.Putter properties,
boolean hidden)
Create a property argument.
|
Property(String name,
char shortName,
String usage,
Property.Putter properties)
Create a property argument with default key and value names.
|
Property(String name,
char shortName,
String metaKey,
String metaVar,
String usage,
Property.Putter properties,
boolean hidden)
Create a property argument.
|
| Modifier and Type | Method and Description |
|---|---|
int |
apply(ArgumentList args)
Parse the argument list, including the argument string that triggered
the call.
|
int |
applyShort(String opts,
ArgumentList args)
When handling a list of short options, except for the last short
option.
|
String |
getMetaKey() |
String |
getPrefix()
Prefix part of the usage usage message.
|
String |
getSingleLineUsage()
Get the argument's single line usage string.
|
void |
validate()
Called on all the arguments after the parsing is done to validate
if all requirements have been passed.
|
getMetaVar, getShortNames, nameOrShortgetDefaultValue, getName, getUsage, isHidden, isRepeated, isRequiredpublic Property(char shortName,
String usage,
Property.Putter properties)
shortName - The short name character.usage - The usage string.properties - The properties instance to populate.public Property(String name, char shortName, String usage, Property.Putter properties)
name - The long option name.shortName - The short name character.usage - The usage string.properties - The properties instance to populate.public Property(char shortName,
String metaKey,
String metaVar,
String usage,
Property.Putter properties)
shortName - The short name character.metaKey - The meta key name.metaVar - The meta value name.usage - The usage string.properties - The properties instance to populate.public Property(char shortName,
String metaKey,
String metaVar,
String usage,
Property.Putter properties,
boolean hidden)
shortName - The short name character.metaKey - The meta key name.metaVar - The meta value name.usage - The usage string.properties - The properties instance to populate.hidden - If the property argument should be hidden.public Property(String name, char shortName, String metaKey, String metaVar, String usage, Property.Putter properties, boolean hidden)
name - The long option name.shortName - The short name character.metaKey - The meta key name.metaVar - The meta value name.usage - The usage string.properties - The properties instance to populate.hidden - If the property argument should be hidden.public String getMetaKey()
public String getSingleLineUsage()
BaseArgumentgetSingleLineUsage in class BaseOptionpublic String getPrefix()
BaseArgumentgetPrefix in class BaseOptionpublic void validate()
throws ArgumentException
BaseArgumentArgumentException if is did not validate with the appropriate
error message.validate in class BaseArgumentArgumentExceptionpublic int applyShort(String opts, ArgumentList args)
BaseOptionapplyShort in class BaseOptionopts - The remaining characters of the short opt list.args - The list of arguments including the short opt list.public int apply(ArgumentList args)
BaseOptionapply in class BaseOptionargs - The list of arguments.Copyright © 2016. All rights reserved.