Package org.dellroad.jct.core.simple
Class SimpleCommandSupport.FoundCommand
java.lang.Object
org.dellroad.jct.core.simple.SimpleCommandSupport.FoundCommand
- Enclosing class:
- SimpleCommandSupport
Represents a command line that has been parsed and the corresponding
SimpleCommand found.-
Constructor Summary
ConstructorsConstructorDescriptionFoundCommand(SimpleCommand command, String name, List<String> parameters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintexecute(ConsoleSession<?, ?> session) Execute this command.getName()
-
Constructor Details
-
FoundCommand
Constructor.- Parameters:
command- the command to executename- command nameparameters- command parameters- Throws:
IllegalArgumentException- if any parameter is null
-
-
Method Details
-
getCommand
-
getName
-
getParameters
-
execute
Execute this command.- Parameters:
session- current session- Returns:
- zero if successful, non-zero error code if an error occurred
- Throws:
InterruptedException- if the current thread is interrupted
-