| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Binding
public class Binding
Represents the variable bindings of a script which can be altered from outside the script object or created outside of a script and passed into it.
| Constructor Summary | |
|---|---|
| Binding() | |
| Binding(Map variables) | |
| Binding(String[] args)A helper constructor used in main(String[]) method calls | |
| Method Summary | |
|---|---|
|  Object | getProperty(String property)Overloaded to make variables appear as bean properties or via the subscript operator | 
|  Object | getVariable(String name) | 
|  Map | getVariables() | 
|  void | setProperty(String property,
            Object newValue)Overloaded to make variables appear as bean properties or via the subscript operator | 
|  void | setVariable(String name,
            Object value)Sets the value of the given variable | 
| 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 | 
|---|
public Binding()
public Binding(Map variables)
public Binding(String[] args)
args - are the command line arguments from a main()| Method Detail | 
|---|
public Object getVariable(String name)
name - the name of the variable to lookup
public void setVariable(String name,
                        Object value)
name - the name of the variable to setvalue - the new value for the given variablepublic Map getVariables()
public Object getProperty(String property)
getProperty in interface GroovyObjectgetProperty in class GroovyObjectSupportproperty - the name of the property of interest
public void setProperty(String property,
                        Object newValue)
setProperty in interface GroovyObjectsetProperty in class GroovyObjectSupportproperty - the name of the property of interestnewValue - the new value for the property| 
 | Copyright © 2003-2010 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||