public class Reference<T> extends GroovyObjectSupport implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
T |
get() |
java.lang.Object |
getProperty(java.lang.String property)
Retrieves a property value.
|
java.lang.Object |
invokeMethod(java.lang.String name,
java.lang.Object args)
Invokes the given method.
|
void |
set(T value) |
void |
setProperty(java.lang.String property,
java.lang.Object newValue)
Sets the given property to the new value.
|
getMetaClass, setMetaClass
public Reference()
public Reference(T value)
public java.lang.Object getProperty(java.lang.String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interestpublic void setProperty(java.lang.String property, java.lang.Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
property
- the name of the property of interestnewValue
- the new value for the propertypublic java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
name
- the name of the method to callargs
- the arguments to use for the method callpublic T get()
public void set(T value)