Package org.codehaus.groovy.runtime

# Class ScriptReference

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Reference
org.codehaus.groovy.runtime.ScriptReference

All Implemented Interfaces:
  `GroovyObject`, `Serializable`

public class ScriptReference extends Reference
Represents a reference to a variable in a script

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScriptReference(Script script, String variable)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `get()`
  Returns the referenced value.
  `void`
  `set(Object value)`
  Updates the referenced value.

  ### Methods inherited from class groovy.lang.Reference

  `getProperty, invokeMethod, setProperty`

  ### Methods inherited from class groovy.lang.GroovyObjectSupport

  `getMetaClass, setMetaClass`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ScriptReference

    public ScriptReference(Script script, String variable)

- ## Method Details

  - ### get

    public Object get()
    Description copied from class: `Reference`
    Returns the referenced value.
    Overrides:
      `get` in class `Reference`
    Returns:
      the referenced value

  - ### set

    public void set(Object value)
    Description copied from class: `Reference`
    Updates the referenced value.
    Overrides:
      `set` in class `Reference`
    Parameters:
      `value` - the new value