groovy.util
Class GroovyScriptEngine.ScriptCacheEntry

java.lang.Object
  extended by groovy.util.GroovyScriptEngine.ScriptCacheEntry
Enclosing class:
GroovyScriptEngine

private static class GroovyScriptEngine.ScriptCacheEntry
extends java.lang.Object


Field Summary
private  java.util.Map dependencies
           
private  long lastModified
           
private  java.lang.Class scriptClass
           
 
Constructor Summary
private GroovyScriptEngine.ScriptCacheEntry()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptClass

private java.lang.Class scriptClass

lastModified

private rceException.html" title="class in groovy.util">ResourceException - if there is a problem accessing the script
ScriptException - if there is a problem parsing the script

dependencyOutOfDate

private boolean dependencyOutOfDate(GroovyScriptEngine.ScriptCacheEntry entry)

run

public java.lang.String run(java.lang.String scriptName,
                            java.lang.String argument)
                     throws ResourceException,
                            ScriptException
Run a script identified by name with a single argument.

Parameters:
scriptName - name of the script to run
argument - a single argument passed as a variable named arg in the binding
Returns:
a toString() representation of the result of the execution of the script
Throws:
ResourceException - if there is a problem accessing the script
ScriptException - if there is a problem parsing the script

run

public java.lang.Object run(java.lang.String scriptName,
                            Binding binding)
                     throws ResourceException,
                            ScriptException
Run a script identified by name with a given binding.

Parameters:
scriptName - name of the script to run
binding - the binding to pass to the script
Returns:
an object
Throws:
ResourceException - if there is a problem accessing the script
ScriptException - if there is a problem parsing the script

createScript

public Script createScript(java.lang.String scriptName,
                           Binding binding)
                    throws ResourceException,
                           ScriptException
Creates a Script with a given scriptName and binding.

Parameters:
scriptName - name of the script to run