Package org.jline.console.impl
Class AbstractCommandRegistry.EnumCmdRegistry<T extends java.lang.Enum<T>>
- java.lang.Object
-
- org.jline.console.impl.AbstractCommandRegistry.EnumCmdRegistry<T>
-
- All Implemented Interfaces:
AbstractCommandRegistry.CmdRegistry
- Enclosing class:
- AbstractCommandRegistry
private static class AbstractCommandRegistry.EnumCmdRegistry<T extends java.lang.Enum<T>> extends java.lang.Object implements AbstractCommandRegistry.CmdRegistry
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
aliasCommand
private java.util.Map<T,CommandMethods>
commandExecute
private java.util.Map<T,java.lang.String>
commandName
private java.util.Map<java.lang.String,T>
nameCommand
-
Constructor Summary
Constructors Constructor Description EnumCmdRegistry(java.util.Map<T,java.lang.String> commandName, java.util.Map<T,CommandMethods> commandExecute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alias(java.lang.String alias, java.lang.String command)
T
command(java.lang.String name)
java.util.Map<java.lang.String,java.lang.String>
commandAliases()
java.util.Set<java.lang.String>
commandNames()
SystemCompleter
compileCompleters()
private void
doNameCommand()
CommandMethods
getCommandMethods(java.lang.String command)
boolean
hasCommand(java.lang.String name)
<V extends java.lang.Enum<V>>
voidrename(V command, java.lang.String newName)
-
-
-
Field Detail
-
commandExecute
private final java.util.Map<T extends java.lang.Enum<T>,CommandMethods> commandExecute
-
aliasCommand
private final java.util.Map<java.lang.String,java.lang.String> aliasCommand
-
-
Constructor Detail
-
EnumCmdRegistry
public EnumCmdRegistry(java.util.Map<T,java.lang.String> commandName, java.util.Map<T,CommandMethods> commandExecute)
-
-
Method Detail
-
doNameCommand
private void doNameCommand()
-
commandNames
public java.util.Set<java.lang.String> commandNames()
- Specified by:
commandNames
in interfaceAbstractCommandRegistry.CmdRegistry
-
commandAliases
public java.util.Map<java.lang.String,java.lang.String> commandAliases()
- Specified by:
commandAliases
in interfaceAbstractCommandRegistry.CmdRegistry
-
rename
public <V extends java.lang.Enum<V>> void rename(V command, java.lang.String newName)
- Specified by:
rename
in interfaceAbstractCommandRegistry.CmdRegistry
-
alias
public void alias(java.lang.String alias, java.lang.String command)
- Specified by:
alias
in interfaceAbstractCommandRegistry.CmdRegistry
-
hasCommand
public boolean hasCommand(java.lang.String name)
- Specified by:
hasCommand
in interfaceAbstractCommandRegistry.CmdRegistry
-
compileCompleters
public SystemCompleter compileCompleters()
- Specified by:
compileCompleters
in interfaceAbstractCommandRegistry.CmdRegistry
-
command
public T command(java.lang.String name)
- Specified by:
command
in interfaceAbstractCommandRegistry.CmdRegistry
-
getCommandMethods
public CommandMethods getCommandMethods(java.lang.String command)
- Specified by:
getCommandMethods
in interfaceAbstractCommandRegistry.CmdRegistry
-
-