Package org.jboss.as.cli.impl
Class FileSystemPathArgument
- java.lang.Object
-
- org.jboss.as.cli.impl.ArgumentWithoutValue
-
- org.jboss.as.cli.impl.ArgumentWithValue
-
- org.jboss.as.cli.impl.FileSystemPathArgument
-
- All Implemented Interfaces:
CommandArgument
public class FileSystemPathArgument extends ArgumentWithValue
- Author:
- Alexey Loubyansky
-
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.impl.ArgumentWithValue
initialState
-
Fields inherited from class org.jboss.as.cli.impl.ArgumentWithoutValue
access, cantAppearAfter, exclusive, fullName, index, requiredPreceding, shortName
-
-
Constructor Summary
Constructors Constructor Description FileSystemPathArgument(CommandHandlerWithArguments handler, FilenameTabCompleter completer, int index, String name)FileSystemPathArgument(CommandHandlerWithArguments handler, FilenameTabCompleter completer, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetValue(ParsedCommandLine args, boolean required)Returns the value of the argument specified on the command line.protected ParsingStateinitParsingState()-
Methods inherited from class org.jboss.as.cli.impl.ArgumentWithValue
getOriginalValue, getResolvedValue, getValueCompleter, getValueConverter, isValueComplete, isValueRequired, resolveValue, resolveValue, toModelNode
-
Methods inherited from class org.jboss.as.cli.impl.ArgumentWithoutValue
addCantAppearAfter, addRequiredPreceding, canAppearNext, getFullName, getIndex, getShortName, getValue, isExclusive, isPresent, setAccessRequirement, setExclusive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.cli.CommandArgument
getDecoratedName
-
-
-
-
Constructor Detail
-
FileSystemPathArgument
public FileSystemPathArgument(CommandHandlerWithArguments handler, FilenameTabCompleter completer, int index, String name)
-
FileSystemPathArgument
public FileSystemPathArgument(CommandHandlerWithArguments handler, FilenameTabCompleter completer, String name)
-
-
Method Detail
-
initParsingState
protected ParsingState initParsingState()
- Overrides:
initParsingStatein classArgumentWithValue
-
getValue
public String getValue(ParsedCommandLine args, boolean required) throws CommandFormatException
Description copied from interface:CommandArgumentReturns the value of the argument specified on the command line. If the argument isn't specified and the value is not required null is returned. Otherwise an exception is thrown.- Specified by:
getValuein interfaceCommandArgument- Overrides:
getValuein classArgumentWithValue- Parameters:
args- parsed arguments.required- whether the value for this argument is required.- Returns:
- the value of the argument or null if the argument isn't present and the value is not required.
- Throws:
CommandFormatException
-
-