Top Description Fields Constructors Methods
groovy.lang

public Class Reference<T>

extends GroovyObjectSupport
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.codehaus.groovy.runtime.ScriptReference
Imports
org.codehaus.groovy.runtime.InvokerHelper, java.io.Serializable

Represents a reference to a value

Field Summary

Modifier and TypeField and Description
private static final long
private T

Constructor Summary

AccessConstructor and Description
public
public
Reference(T value)

Method Summary

Modifier and TypeMethod and Description
public T
get()

public Object
getProperty(String
the name of the property of interest
property
)

Overrides default groovy.lang.GroovyObject.getProperty.

Retrieves a property value.
public Object
invokeMethod(String
the name of the method to call
name
,
Object
the arguments to use for the method call
args
)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.
public void
set(T value)

public void
setProperty(String
the name of the property of interest
property
,
Object
the new value for the property
newValue
)

Overrides default groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.
Inherited from groovy.lang.GroovyObjectSupport:
getMetaClasssetMetaClass

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
private T value

Constructor Detail

Referenceback to summary
public Reference()
Referenceback to summary
public Reference(T value)

Method Detail

getback to summary
public T get()
getPropertyback to summary
public Object getProperty(String property)

Overrides default groovy.lang.GroovyObject.getProperty.

Doc from groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

Parameters
property:String

the name of the property of interest

Returns:Object

the given property

invokeMethodback to summary
public Object invokeMethod(String name, Object args)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Doc from groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

Parameters
name:String

the name of the method to call

args:Object

the arguments to use for the method call

Returns:Object

the result of invoking the method

setback to summary
public void set(T value)
setPropertyback to summary
public void setProperty(String property, Object newValue)

Overrides default groovy.lang.GroovyObject.setProperty.

Doc from groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

Parameters
property:String

the name of the property of interest

newValue:Object

the new value for the property