- java.lang.Object
-
- org.jline.console.impl.GogoCommandGroup
-
- All Implemented Interfaces:
org.jline.shell.CommandGroup
public class GogoCommandGroup extends java.lang.Object implements org.jline.shell.CommandGroupACommandGroupthat wraps a legacyCommandRegistry's commands as shellCommands.This provides a migration path from the console module's
CommandRegistryAPI to the shell module'sCommandGroupAPI. Each command in the registry is wrapped as a shellCommandthat delegates to the registry'sCommandRegistry.invoke(CommandRegistry.CommandSession, String, Object...)method.Example:
CommandRegistry registry = ...; // existing Gogo/console registry dispatcher.addGroup(new GogoCommandGroup("Gogo", registry));- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description GogoCommandGroup(java.lang.String name, CommandRegistry registry)Creates a new GogoCommandGroup wrapping the given registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<org.jline.shell.Command>commands()java.lang.Stringname()
-
-
-
Constructor Detail
-
GogoCommandGroup
public GogoCommandGroup(java.lang.String name, CommandRegistry registry)Creates a new GogoCommandGroup wrapping the given registry.- Parameters:
name- the group nameregistry- the command registry to wrap
-
-