Package org.jline.shell.impl
Class AbstractCommand
java.lang.Object
org.jline.shell.impl.AbstractCommand
- All Implemented Interfaces:
Command
Base implementation of
Command that stores name and aliases.
Example:
Command echo = new AbstractCommand("echo", "e") {
@Override
public Object execute(CommandSession session, String[] args) {
session.out().println(String.join(" ", args));
return null;
}
};
- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCommand(String name, String... aliases) Creates a new command with the given name and optional aliases. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.shell.Command
completer, completers, describe, description, execute, subcommands
-
Constructor Details
-
AbstractCommand
-
-
Method Details
-
name
-
aliases
-