groovy.lang
Class Script

java.lang.Object
  extended bygroovy.lang.GroovyObjectSupport
      extended bygroovy.lang.Script
All Implemented Interfaces:
GroovyObject

public abstract class Script
extends GroovyObjectSupport

This object represents a Groovy script

Version:
$Revision: 1.9 $
Author:
James Strachan

Constructor Summary
Script()
           
 
Method Summary
 Binding getBinding()
           
 java.lang.Object getProperty(java.lang.String property)
           
 void print(java.lang.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.
 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.
 void println(java.lang.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.
abstract  java.lang.Object run()
          The main instance method of a script which has variables in scope as defined by the current Binding instance.
 void setBinding(Binding binding)
           
 void setProperty(java.lang.String property, java.lang.Object newValue)
          Sets the given property to the new value
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Script

public Script()
Method Detail

getBinding

public Binding getBinding()

setBinding

public void setBinding(Binding binding)

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface GroovyObject
Overrides:
getProperty in class GroovyObjectSupport

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object newValue)
Description copied from interface: GroovyObject
Sets the given property to the new value

Specified by:
setProperty in interface GroovyObject
Overrides:
setProperty in class GroovyObjectSupport

run

public abstract java.lang.Object run()
The main instance method of a script which has variables in scope as defined by the current Binding instance.

Returns:

println

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.


print

public void print(java.lang.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.


println

public void println(java.lang.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.



Copyright © 2003-2004 The Codehaus. All Rights Reserved.