org.crsh.repl
Interface Repl

All Known Implementing Classes:
GroovyRepl, GroovyReplImpl, ScriptRepl

public interface Repl

Read–eval–print loop.

Author:
Julien Viet

Method Summary
 CompletionMatch complete(ReplSession session, String prefix)
          Perform completion.
 EvalResponse eval(ReplSession session, String request)
          Evaluate a request
 String getDescription()
          Returns a descripton of the REPL.
 String getName()
          Return the repl name.
 boolean isActive()
          Return true if this REPL is active.
 

Method Detail

isActive

boolean isActive()
Return true if this REPL is active. Implementation can decide based on the runtime, for instance the Groovy REPL can be inactive when Groovy is not available at runtime.

Returns:
the active status

getName

String getName()
Return the repl name.

Returns:
the repl name

getDescription

String getDescription()
Returns a descripton of the REPL.

Returns:
the repl description

eval

EvalResponse eval(ReplSession session,
                  String request)
Evaluate a request

Parameters:
session - the session
request - the request to evaluate
Returns:
the evaluation response

complete

CompletionMatch complete(ReplSession session,
                         String prefix)
Perform completion.

Parameters:
session - the session
prefix - the prefix to complete
Returns:
the completion match


Copyright © 2014 eXo Platform SAS. All Rights Reserved.