groovy.lang
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.

author:
James Strachan
version:
$Revision: 9818 $

Field Summary
 Map variables
           
 
Constructor Summary
Binding()
           
Binding(Map variables)
           
Binding(def 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
 

Constructor Detail

Binding

public Binding()


Binding

public Binding(Map variables)


Binding

public Binding(def args)
A helper constructor used in main(String[]) method calls
param:
args are the command line arguments from a main()


Method Detail

getProperty

public Object getProperty(String property)
Overloaded to make variables appear as bean properties or via the subscript operator


getVariable

public Object getVariable(String name)
param:
name the name of the variable to lookup
return:
the variable value


getVariables

public Map getVariables()


setProperty

public void setProperty(String property, Object newValue)
Overloaded to make variables appear as bean properties or via the subscript operator


setVariable

public void setVariable(String name, Object value)
Sets the value of the given variable
param:
name the name of the variable to set
param:
value the new value for the given variable