Package sqlline
Class AbstractCommandHandler
- java.lang.Object
-
- sqlline.AbstractCommandHandler
-
- All Implemented Interfaces:
CommandHandler
- Direct Known Subclasses:
ReflectiveCommandHandler
public abstract class AbstractCommandHandler extends Object implements CommandHandler
An abstract implementation of CommandHandler.
-
-
Constructor Summary
Constructors Constructor Description AbstractCommandHandler(SqlLine sqlLine, String[] names, String helpText, List<org.jline.reader.Completer> completers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHelpText()
String
getName()
List<String>
getNames()
List<org.jline.reader.Completer>
getParameterCompleters()
Returns the completers that can handle parameters.String
matches(String line)
Checks to see if the specified string can be dispatched to this command.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface sqlline.CommandHandler
execute
-
-
-
-
Method Detail
-
getHelpText
public String getHelpText()
- Specified by:
getHelpText
in interfaceCommandHandler
- Returns:
- the short help description for this command.
-
getName
public String getName()
- Specified by:
getName
in interfaceCommandHandler
- Returns:
- the name of the command
-
getNames
public List<String> getNames()
- Specified by:
getNames
in interfaceCommandHandler
- Returns:
- all the possible names of this command.
-
matches
public String matches(String line)
Description copied from interface:CommandHandler
Checks to see if the specified string can be dispatched to this command.- Specified by:
matches
in interfaceCommandHandler
- Parameters:
line
- The command line to check- Returns:
- the command string that matches, or null if it no match
-
getParameterCompleters
public List<org.jline.reader.Completer> getParameterCompleters()
Description copied from interface:CommandHandler
Returns the completers that can handle parameters.- Specified by:
getParameterCompleters
in interfaceCommandHandler
- Returns:
- Completers that can handle parameters
-
-