org.crsh.lang.script
Class ScriptRepl

java.lang.Object
  extended by org.crsh.lang.script.ScriptRepl
All Implemented Interfaces:
Repl

public class ScriptRepl
extends Object
implements Repl

Author:
Julien Viet

Field Summary
private static ScriptRepl instance
          .
(package private) static Logger log
          .
 
Constructor Summary
private ScriptRepl()
           
 
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.
static ScriptRepl getInstance()
           
 String getName()
          Return the repl name.
 boolean isActive()
          Return true if this REPL is active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static final ScriptRepl instance
.


log

static final Logger log
.

Constructor Detail

ScriptRepl

private ScriptRepl()
Method Detail

getInstance

public static ScriptRepl getInstance()

isActive

public boolean isActive()
Description copied from interface: Repl
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.

Specified by:
isActive in interface Repl
Returns:
the active status

getName

public String getName()
Description copied from interface: Repl
Return the repl name.

Specified by:
getName in interface Repl
Returns:
the repl name

getDescription

public String getDescription()
Description copied from interface: Repl
Returns a descripton of the REPL.

Specified by:
getDescription in interface Repl
Returns:
the repl description

eval

public EvalResponse eval(ReplSession session,
                         String request)
Description copied from interface: Repl
Evaluate a request

Specified by:
eval in interface Repl
Parameters:
session - the session
request - the request to evaluate
Returns:
the evaluation response

complete

public CompletionMatch complete(ReplSession session,
                                String prefix)
Description copied from interface: Repl
Perform completion.

Specified by:
complete in interface Repl
Parameters:
session - the session
prefix - the prefix to complete
Returns:
the completion match


Copyright © 2014 eXo Platform SAS. All Rights Reserved.