public class Reference<T>
extends GroovyObjectSupport
implements Serializable
Represents a reference to a value
| Type Params | Return Type | Name and description |
|---|---|---|
|
public T |
get()Returns the referenced value. |
|
public Object |
getProperty(String property)Retrieves a property value.
|
|
public Object |
invokeMethod(String name, Object args)Invokes the given method.
|
|
public void |
set(T value)Updates the referenced value. |
|
public void |
setProperty(String property, Object newValue)Sets the given property to the new value.
|
| Methods inherited from class | Name |
|---|---|
class GroovyObjectSupport |
getMetaClass, setMetaClass |
Creates an empty reference.
Creates a reference initialized with the supplied value.
value - the initial valueReturns the referenced value.
Retrieves a property value.
propertyName - the name of the property of interestInvokes the given method.
name - the name of the method to callargs - the arguments to use for the method callUpdates the referenced value.
value - the new valueCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.