public abstract class AbstractCompleterCommand extends AbstractCommand implements CompleterService
CompleterService
directly and separately
from the Command implementations.
This class is meant for use with OSGi Declarative Services. Subclasses should be annotated with @Component, @Service,
and @Property(name = Command.NAME, value = "command-name-here") at minimum.Constructor and Description |
---|
AbstractCompleterCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
If implementation subclasses override this method, they must call through to this super implementation as
well, or else tab completions will fail to be registered correctly.
|
Set<String> |
getCommands()
The set of command names for which tab completions are provided.
|
Map<CliCommandOption,? extends TabCompleter> |
getOptionCompleters()
Provides the mapping of options to corresponding completers.
|
Map<String,Map<CliCommandOption,? extends TabCompleter>> |
getSubcommandCompleters()
Provides the mapping of subcommand options to corresponding completers.
|
isStorageRequired, requireNonNull
@Activate protected void activate(org.osgi.service.component.ComponentContext context)
public final Set<String> getCommands()
Command.NAME
property.getCommands
in interface CompleterService
public Map<CliCommandOption,? extends TabCompleter> getOptionCompleters()
CompleterService
getOptionCompleters
in interface CompleterService
public Map<String,Map<CliCommandOption,? extends TabCompleter>> getSubcommandCompleters()
CompleterService
CompleterService.getOptionCompleters()
.getSubcommandCompleters
in interface CompleterService
Copyright © 2017. All rights reserved.