org.crsh.lang.impl.groovy
Class GroovyLanguage

java.lang.Object
  extended by org.crsh.lang.impl.groovy.GroovyLanguage
All Implemented Interfaces:
Language

public class GroovyLanguage
extends Object
implements Language

Author:
Julien Viet

Field Summary
private  GroovyCompiler compiler
          .
private  GroovyRepl repl
          .
private  ClassCache<GroovyScript> scriptCache
          .
 
Constructor Summary
GroovyLanguage(PluginContext context)
           
 
Method Summary
 void destroy(ShellSession session)
          Destroy session callback.
 Compiler getCompiler()
           
 String getDisplayName()
           
 GroovyScript getLifeCycle(ShellSession session, String name)
           
 String getName()
           
 Repl getRepl()
           
 void init(ShellSession session)
          Init session callback.
 boolean isActive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptCache

private ClassCache<GroovyScript> scriptCache
.


repl

private GroovyRepl repl
.


compiler

private GroovyCompiler compiler
.

Constructor Detail

GroovyLanguage

public GroovyLanguage(PluginContext context)
Method Detail

getName

public String getName()
Specified by:
getName in interface Language
Returns:
the language name

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface Language
Returns:
the language display name, including the version if possible

isActive

public boolean isActive()
Specified by:
isActive in interface Language
Returns:
true if this language is active. Implementation can decide based on the runtime, for instance the Groovy language can be inactive when the Groovy runtime is not available

getRepl

public Repl getRepl()
Specified by:
getRepl in interface Language
Returns:
the repl for this language, null should be returned when the language does not support the repl feature

getCompiler

public Compiler getCompiler()
Specified by:
getCompiler in interface Language
Returns:
the compiler for this language, null should be returned when the language does not support the compilation feature

init

public void init(ShellSession session)
Description copied from interface: Language
Init session callback.

Specified by:
init in interface Language
Parameters:
session - the initialized session

destroy

public void destroy(ShellSession session)
Description copied from interface: Language
Destroy session callback.

Specified by:
destroy in interface Language
Parameters:
session - the destroyed session

getLifeCycle

public GroovyScript getLifeCycle(ShellSession session,
                                 String name)
                          throws CommandException,
                                 NullPointerException
Throws:
CommandException
NullPointerException


Copyright © 2015 eXo Platform SAS. All Rights Reserved.