Save This Page
Home » groovy-src-1.6.5 » groovy » lang » [javadoc | source]
groovy.lang
abstract public class: Script [javadoc | source]
java.lang.Object
   groovy.lang.GroovyObjectSupport
      groovy.lang.Script

All Implemented Interfaces:
    GroovyObject

This object represents a Groovy script
Constructor:
 protected Script() 
 protected Script(Binding binding) 
Method from groovy.lang.Script Summary:
evaluate,   evaluate,   getBinding,   getProperty,   invokeMethod,   print,   println,   println,   run,   run,   setBinding,   setProperty
Methods from groovy.lang.GroovyObjectSupport:
getMetaClass,   getProperty,   invokeMethod,   setMetaClass,   setProperty
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from groovy.lang.Script Detail:
 public Object evaluate(String expression) throws CompilationFailedException 
    A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope
 public Object evaluate(File file) throws CompilationFailedException, IOException 
    A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope
 public Binding getBinding() 
 public Object getProperty(String property) 
 public Object invokeMethod(String name,
    Object args) 
    Invoke a method (or closure in the binding) defined.
 public  void print(Object value) 
    Prints the value to the current 'out' variable which should be a PrintWriter or at least have a print() method defined on it. If there is no 'out' property then print to standard out.
 public  void println() 
    Prints a newline to the current 'out' variable which should be a PrintWriter or at least have a println() method defined on it. If there is no 'out' property then print to standard out.
 public  void println(Object value) 
    Prints the value and a newline to the current 'out' variable which should be a PrintWriter or at least have a println() method defined on it. If there is no 'out' property then print to standard out.
 abstract public Object run()
    The main instance method of a script which has variables in scope as defined by the current Binding instance.
 public  void run(File file,
    String[] arguments) throws CompilationFailedException, IOException 
    A helper method to allow scripts to be run taking command line arguments
 public  void setBinding(Binding binding) 
 public  void setProperty(String property,
    Object newValue)