org.crsh.lang.groovy
Class GroovyReplImpl

java.lang.Object
  extended by org.crsh.lang.groovy.GroovyReplImpl
All Implemented Interfaces:
Repl

public class GroovyReplImpl
extends Object
implements Repl

Groovy REPL implementation.

Author:
Julien Viet

Constructor Summary
GroovyReplImpl()
           
 
Method Summary
 CompletionMatch complete(ReplSession session, String prefix)
          Perform completion.
 EvalResponse eval(ReplSession session, String r2)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyReplImpl

public GroovyReplImpl()
Method Detail

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 r2)
Description copied from interface: Repl
Evaluate a request

Specified by:
eval in interface Repl
Parameters:
session - the session
r2 - 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.