|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.scripting.Groovy
public class Groovy
A helper class for Groovy.
scripting.Groovy,
Serialized Form| Field Summary | |
|---|---|
static String |
CLASS_GROOVYCLASSLOADER
the classname of the Groovy classloader. |
protected Object |
m_ClassLoader
the classloader. |
protected static boolean |
m_Present
whether the Groovy classes are in the Classpath. |
| Constructor Summary | |
|---|---|
Groovy()
default constructor, tries to instantiate a Groovy classloader. |
|
| Method Summary | |
|---|---|
Object |
getClassLoader()
returns the currently used Groovy classloader. |
static Object |
invoke(Object o,
String methodName,
Class[] paramClasses,
Object[] paramValues)
executes the specified method and returns the result, if any. |
Object |
invoke(String methodName,
Class[] paramClasses,
Object[] paramValues)
executes the specified method on the current interpreter and returns the result, if any. |
static boolean |
isPresent()
returns whether the Groovy classes are present or not, i.e. |
static Object[] |
loadScriptObject(Class cls,
adams.core.io.PlaceholderFile scriptFile,
GroovyScript inlineScript,
String scriptOptions,
adams.core.Variables vars)
Loads the scripts object and sets its options. |
static void |
main(String[] args)
If no arguments are given, it just prints the presence of the Groovy classes, otherwise it expects a Groovy filename to execute. |
static Object |
newClassLoader()
initializes and returns a Groovy Interpreter. |
static Object |
newInstance(File file,
Class template)
loads the module and returns a new instance of it as instance of the provided Java class template. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASS_GROOVYCLASSLOADER
protected static boolean m_Present
protected Object m_ClassLoader
| Constructor Detail |
|---|
public Groovy()
| Method Detail |
|---|
public Object getClassLoader()
public Object invoke(String methodName,
Class[] paramClasses,
Object[] paramValues)
methodName - the name of the methodparamClasses - the classes of the parametersparamValues - the values of the parameters
public static boolean isPresent()
public static Object newClassLoader()
public static Object newInstance(File file,
Class template)
file - the Groovy module filetemplate - the template for the returned Java object
public static Object invoke(Object o,
String methodName,
Class[] paramClasses,
Object[] paramValues)
o - the object the method should be called from,
e.g., a Groovy InterpretermethodName - the name of the methodparamClasses - the classes of the parametersparamValues - the values of the parameters
public static Object[] loadScriptObject(Class cls,
adams.core.io.PlaceholderFile scriptFile,
GroovyScript inlineScript,
String scriptOptions,
adams.core.Variables vars)
cls - the class to instantiatescriptFile - the external file to loadinlineScript - the inline script to load if external file points to a directoryscriptOptions - the options to setvars - the variables to use for expanding
public static void main(String[] args)
args - commandline arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||