@ThreadSafe public final class LsCommand extends Object implements Command
Constructor and Description |
---|
LsCommand()
Constructs a new instance of
LsCommand . |
Modifier and Type | Method and Description |
---|---|
String |
getCommandName()
Gets the command name as input from the shell.
|
String |
getDescription() |
String |
getUsage() |
int |
run(org.apache.commons.cli.CommandLine cl)
Runs the command.
|
void |
validateArgs(org.apache.commons.cli.CommandLine cl)
Checks if the arguments are valid or throw InvalidArgumentException.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getOptions, getSubCommands, hasSubCommand, parseAndValidateArgs
public LsCommand()
LsCommand
.public String getCommandName()
Command
getCommandName
in interface Command
public void validateArgs(org.apache.commons.cli.CommandLine cl) throws InvalidArgumentException
Command
validateArgs
in interface Command
cl
- the parsed command line for the argumentsInvalidArgumentException
- when arguments are not validpublic String getUsage()
public String getDescription()
getDescription
in interface Command
Copyright © 2023. All Rights Reserved.