- java.lang.Object
-
- org.jline.console.impl.CommandGroupAdapter
-
- All Implemented Interfaces:
org.jline.shell.CommandGroup
public class CommandGroupAdapter extends java.lang.Object implements org.jline.shell.CommandGroupAdapts an oldCommandRegistryto the newCommandGroupinterface.This bridge allows existing command registries (e.g.,
Builtins,GroovyCommand) to be used with the newShellandCommandDispatcherAPIs.Each command in the registry is wrapped as a
Commandthat delegates execution back toCommandRegistry.invoke(CommandRegistry.CommandSession, String, Object...).- Since:
- 4.0
- See Also:
CommandRegistryAdapter
-
-
Constructor Summary
Constructors Constructor Description CommandGroupAdapter(CommandRegistry registry)Creates an adapter wrapping the given command 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
-
CommandGroupAdapter
public CommandGroupAdapter(CommandRegistry registry)
Creates an adapter wrapping the given command registry.- Parameters:
registry- the old command registry to adapt
-
-