Package io.permazen.cli
Class SimpleCommandWrapper
java.lang.Object
io.permazen.cli.SimpleCommandWrapper
- All Implemented Interfaces:
org.dellroad.jct.core.simple.SimpleCommand
public class SimpleCommandWrapper
extends Object
implements org.dellroad.jct.core.simple.SimpleCommand
Wraps a Permazen
Command
, making it into a Java Console Toolkit SimpleCommand
.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SimpleCommandWrapper
Constructor.- Parameters:
command
- wrapped command- Throws:
IllegalArgumentException
- ifcommand
is null
-
-
Method Details
-
getCommand
Get the underlyingCommand
.- Returns:
- wrapped command
-
getUsage
- Specified by:
getUsage
in interfaceorg.dellroad.jct.core.simple.SimpleCommand
-
getHelpSummary
- Specified by:
getHelpSummary
in interfaceorg.dellroad.jct.core.simple.SimpleCommand
-
getHelpDetail
- Specified by:
getHelpDetail
in interfaceorg.dellroad.jct.core.simple.SimpleCommand
-
execute
public int execute(org.dellroad.jct.core.ConsoleSession<?, ?> consoleSession, String name, List<String> args) throws InterruptedException- Specified by:
execute
in interfaceorg.dellroad.jct.core.simple.SimpleCommand
- Throws:
InterruptedException
-