|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Script
class Script extends GroovyObjectSupport
This object represents a Groovy script
Constructor Summary | |
protected Script()
|
|
protected Script(Binding binding)
|
Method Summary | |
---|---|
Object
|
evaluate(String expression)
A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope |
Object
|
evaluate(File file)
A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope |
Binding
|
getBinding()
|
Object
|
getProperty(String property)
|
Object
|
invokeMethod(String name, Object args)
Invoke a method (or closure in the binding) defined. |
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. |
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(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. |
Object
|
run()
The main instance method of a script which has variables in scope as defined by the current { |
void
|
run(File file, String[] arguments)
A helper method to allow scripts to be run taking command line arguments |
void
|
setBinding(Binding binding)
|
void
|
setProperty(String property, Object newValue)
|
Methods inherited from class GroovyObjectSupport | |
---|---|
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Constructor Detail |
---|
protected Script()
protected Script(Binding binding)
Method Detail |
---|
public Object evaluate(String expression)
public Object evaluate(File file)
public Binding getBinding()
public Object getProperty(String property)
public Object invokeMethod(String name, Object args)
public void print(Object value)
public void println()
public void println(Object value)
public Object run()
public void run(File file, String[] arguments)
public void setBinding(Binding binding)
public void setProperty(String property, Object newValue)
Copyright © 2003-2009 The Codehaus. All rights reserved.