public class Binding extends GroovyObjectSupport
Binding instances are not supposed to be used in a multi-threaded context.
Constructor and Description |
---|
Binding() |
Binding(Map variables) |
Binding(String[] args)
A helper constructor used in main(String[]) method calls
|
Modifier and Type | Method and Description |
---|---|
Object |
getProperty(String property)
Overloaded to make variables appear as bean properties or via the subscript operator
|
Object |
getVariable(String name) |
Map |
getVariables() |
boolean |
hasVariable(String name)
Simple check for whether the binding contains a particular variable or not.
|
void |
removeVariable(String name)
remove the variable with the specified name
|
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
|
getMetaClass, setMetaClass
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invokeMethod
public Binding()
public Binding(Map variables)
public Binding(String[] args)
args
- are the command line arguments from a main()public Object getVariable(String name)
name
- the name of the variable to lookuppublic void setVariable(String name, Object value)
name
- the name of the variable to setvalue
- the new value for the given variablepublic void removeVariable(String name)
name
- the name of the variable to removepublic boolean hasVariable(String name)
name
- the name of the variable to check forpublic Map getVariables()
public Object getProperty(String property)
property
- the name of the property of interest