public abstract class

AbstractCommandInterpreter

extends Object
implements ICommandInterpreter
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.interpreter.AbstractCommandInterpreter

Class Overview

Skeleton for a command interpreter.

Summary

Public Constructors
AbstractCommandInterpreter()
Public Methods
AutocompletionResult autoComplete(String command)
Provide a best-effort completion suggestion for the provided partial command.
String getBanner()
Retrieve the interpreter's banner/logo string.
String getDescription()
Get the long name or description.
void prepare()
Interpreters may place resource intensive preparation operations here.
boolean shouldDisplayRawResults()
Determine whether this interpreter prefers that the results of executed commands be printed as-is.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.util.interpreter.ICommandInterpreter

Public Constructors

public AbstractCommandInterpreter ()

Public Methods

public AutocompletionResult autoComplete (String command)

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

Returns
  • optional auto-completion result object

public 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 String getDescription ()

Get the long name or description.

Returns
  • optional string

public 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 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.