public interface

ICommandInterpreter

com.pnfsoftware.jeb.util.interpreter.ICommandInterpreter
Known Indirect Subclasses

Class Overview

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.

Summary

Public Methods
abstract AutocompletionResult autoComplete(String command)
Provide a best-effort completion suggestion for the provided partial command.
abstract ExecutionResult executeCommand(String command)
Execute a command.
abstract String getBanner()
Retrieve the interpreter's banner/logo string.
abstract String getDescription()
Get the long name or description.
abstract String getName()
Get the (short) name of this interpreter.
abstract void prepare()
Interpreters may place resource intensive preparation operations here.
abstract boolean shouldDisplayRawResults()
Determine whether this interpreter prefers that the results of executed commands be printed as-is.

Public Methods

public abstract AutocompletionResult autoComplete (String command)

Provide a best-effort completion suggestion for the provided partial command.

Returns
  • optional auto-completion result object

public abstract ExecutionResult executeCommand (String command)

Execute a command.

public abstract String getBanner ()

Retrieve the interpreter's banner/logo string.

Returns
  • optional string that client code (shells) may display when the interpreter was just instantiated

public abstract String getDescription ()

Get the long name or description.

Returns
  • optional string

public abstract String getName ()

Get the (short) name of this interpreter.

Returns
  • non-null string

public abstract void prepare ()

Interpreters may place resource intensive preparation operations here. Clients may optionally call this method before invoking either: executeCommand(String) or autoComplete(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.

public abstract boolean shouldDisplayRawResults ()

Determine whether this interpreter prefers that the results of executed commands be printed as-is. Clients decide whether or not they want to follow this guideline.