public class Reference<T> extends GroovyObjectSupport implements Serializable
Modifier and Type | Method and Description |
---|---|
T |
get() |
Object |
getProperty(String property)
Retrieves a property value.
|
Object |
invokeMethod(String name,
Object args)
Invokes the given method.
|
void |
set(T value) |
void |
setProperty(String property,
Object newValue)
Sets the given property to the new value.
|
getMetaClass, setMetaClass
public Reference()
public Reference(T value)
public Object getProperty(String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interestpublic void setProperty(String property, 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 Object invokeMethod(String name, 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)