public class ArgumentWithValue extends ArgumentWithoutValue
access, cantAppearAfter, exclusive, fullName, index, requiredPreceding, shortName| Constructor and Description |
|---|
ArgumentWithValue(CommandHandlerWithArguments handler,
CommandLineCompleter valueCompleter,
ArgumentValueConverter valueConverter,
String fullName) |
ArgumentWithValue(CommandHandlerWithArguments handler,
CommandLineCompleter valueCompleter,
ArgumentValueConverter valueConverter,
String fullName,
String shortName) |
ArgumentWithValue(CommandHandlerWithArguments handler,
CommandLineCompleter valueCompleter,
int index,
String fullName) |
ArgumentWithValue(CommandHandlerWithArguments handler,
CommandLineCompleter valueCompleter,
String fullName) |
ArgumentWithValue(CommandHandlerWithArguments handler,
int index,
String fullName) |
ArgumentWithValue(CommandHandlerWithArguments handler,
String fullName) |
| Modifier and Type | Method and Description |
|---|---|
String |
getOriginalValue(ParsedCommandLine parsedLine,
boolean required)
Returns value as it appeared on the command line with escape sequences
and system properties not resolved.
|
String |
getResolvedValue(ParsedCommandLine parsedLine,
boolean required)
Calls getOriginalValue(ParsedCommandLine parsedLine, boolean required) and correctly
handles escape sequences and resolves system properties.
|
String |
getValue(ParsedCommandLine args,
boolean required)
Returns the value of the argument specified on the command line.
|
CommandLineCompleter |
getValueCompleter()
Returns the tab-completer for the value.
|
ArgumentValueConverter |
getValueConverter() |
protected ParsingState |
initParsingState() |
boolean |
isValueComplete(ParsedCommandLine args)
Checks whether the value is specified and complete.
|
boolean |
isValueRequired()
Checks whether the argument accepts value.
|
static String |
resolveValue(String value) |
static String |
resolveValue(String value,
ParsingState initialState) |
org.jboss.dmr.ModelNode |
toModelNode(CommandContext ctx) |
addCantAppearAfter, addRequiredPreceding, canAppearNext, getFullName, getIndex, getShortName, getValue, isPresent, setAccessRequirement, setExclusivepublic ArgumentWithValue(CommandHandlerWithArguments handler, String fullName)
public ArgumentWithValue(CommandHandlerWithArguments handler, CommandLineCompleter valueCompleter, String fullName)
public ArgumentWithValue(CommandHandlerWithArguments handler, CommandLineCompleter valueCompleter, ArgumentValueConverter valueConverter, String fullName)
public ArgumentWithValue(CommandHandlerWithArguments handler, int index, String fullName)
public ArgumentWithValue(CommandHandlerWithArguments handler, CommandLineCompleter valueCompleter, int index, String fullName)
public ArgumentWithValue(CommandHandlerWithArguments handler, CommandLineCompleter valueCompleter, ArgumentValueConverter valueConverter, String fullName, String shortName)
protected ParsingState initParsingState()
public CommandLineCompleter getValueCompleter()
CommandArgumentgetValueCompleter in interface CommandArgumentgetValueCompleter in class ArgumentWithoutValuepublic String getValue(ParsedCommandLine args, boolean required) throws CommandFormatException
CommandArgumentgetValue in interface CommandArgumentgetValue in class ArgumentWithoutValueargs - parsed arguments.required - whether the value for this argument is required.CommandFormatExceptionpublic String getResolvedValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException
parsedLine - parsed command linerequired - whether the argument is requiredCommandFormatException - in case the required argument is missingpublic static String resolveValue(String value) throws CommandFormatException
CommandFormatExceptionpublic static String resolveValue(String value, ParsingState initialState) throws CommandFormatException
CommandFormatExceptionpublic String getOriginalValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException
parsedLine - parsed command linerequired - whether the argument is requiredCommandFormatException - in case the required argument is missingpublic org.jboss.dmr.ModelNode toModelNode(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionpublic boolean isValueRequired()
CommandArgumentisValueRequired in interface CommandArgumentisValueRequired in class ArgumentWithoutValuepublic boolean isValueComplete(ParsedCommandLine args) throws CommandFormatException
CommandArgumentisValueComplete in interface CommandArgumentisValueComplete in class ArgumentWithoutValueargs - the parsed argumentsCommandFormatExceptionpublic ArgumentValueConverter getValueConverter()
Copyright © 2014 JBoss by Red Hat. All rights reserved.