Interface ICommandInterpreter
- All Known Subinterfaces:
IUnitInterpreter
- All Known Implementing Classes:
AbstractCommandInterpreter
,JebPythonInterpreter
public interface ICommandInterpreter
Definition of a command interpreter.
Plugins can provide command interpreters to offer advanced functionality to clients. In the JEB UI client, interpreters are made available in the Terminal panel.
-
Method Summary
Modifier and TypeMethodDescriptionautoComplete
(String command) Provide a best-effort completion suggestion for the provided partial command.executeCommand
(String command) Execute a command.Retrieve the interpreter's banner/logo string.Get the long name or description.getName()
Get the (short) name of this interpreter.void
prepare()
Interpreters may place resource intensive preparation operations here.boolean
Determine whether this interpreter prefers that the results ofexecuted commands
be printed as-is.
-
Method Details
-
getName
String getName()Get the (short) name of this interpreter.- Returns:
- non-null string
-
getDescription
String getDescription()Get the long name or description.- Returns:
- optional string
-
getBanner
String getBanner()Retrieve the interpreter's banner/logo string.- Returns:
- optional string that client code (shells) may display when the interpreter was just instantiated
-
prepare
void prepare()Interpreters may place resource intensive preparation operations here. Clients may optionally call this method before invoking either:executeCommand(String)
orautoComplete(String)
. Clients may decide to not call thsi method. An interpreter implementation must handle cases where prepare() is never called, sometimes called, called multiple times, etc. -
executeCommand
Execute a command.- Parameters:
command
-- Returns:
-
shouldDisplayRawResults
boolean shouldDisplayRawResults()Determine whether this interpreter prefers that the results ofexecuted commands
be printed as-is. Clients decide whether or not they want to follow this guideline.- Returns:
-
autoComplete
Provide a best-effort completion suggestion for the provided partial command.- Parameters:
command
-- Returns:
- optional auto-completion result object
-