Interface ICommandInterpreter
- All Known Subinterfaces:
IUnitInterpreter
- All Known Implementing Classes:
AbstractCommandInterpreter
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.voidprepare()Interpreters may place resource intensive preparation operations here.booleanDetermine whether this interpreter prefers that the results ofexecuted commandsbe 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 this method. An interpreter implementation must handle cases where prepare() is never called, sometimes called, called multiple times, etc. -
executeCommand
Execute a command.- Parameters:
command- command line to execute- Returns:
- the execution result
-
shouldDisplayRawResults
boolean shouldDisplayRawResults()Determine whether this interpreter prefers that the results ofexecuted commandsbe printed as-is. Clients decide whether or not they want to follow this guideline.- Returns:
- true if clients should display execution results without additional formatting
-
autoComplete
Provide a best-effort completion suggestion for the provided partial command.- Parameters:
command- partial command line- Returns:
- optional auto-completion result object
-