org.crsh.lang.groovy
Class GroovyRepl

java.lang.Object
  extended by org.crsh.plugin.CRaSHPlugin<Repl>
      extended by org.crsh.lang.groovy.GroovyRepl
All Implemented Interfaces:
Repl

public class GroovyRepl
extends CRaSHPlugin<Repl>
implements Repl

Author:
Julien Viet

Field Summary
private static Repl groovyRepl
          .
(package private) static Logger log
          .
 
Fields inherited from class org.crsh.plugin.CRaSHPlugin
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING
 
Constructor Summary
GroovyRepl()
           
 
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.
 Repl getImplementation()
          Returns the implementation.
 String getName()
          Return the repl name.
static Repl getREPL()
           
 boolean isActive()
          Return true if this REPL is active.
 
Methods inherited from class org.crsh.plugin.CRaSHPlugin
createConfigurationCapabilities, destroy, getConfigurationCapabilities, getContext, getStatus, getType, init, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

static final Logger log
.


groovyRepl

private static final Repl groovyRepl
.

Constructor Detail

GroovyRepl

public GroovyRepl()
Method Detail

getREPL

public static Repl getREPL()

getImplementation

public Repl getImplementation()
Description copied from class: CRaSHPlugin
Returns the implementation.

Specified by:
getImplementation in class CRaSHPlugin<Repl>
Returns:
the implementation

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.