org.millscript.millscript.vm
Class Ref

java.lang.Object
  extended by org.millscript.millscript.vm.Ref

public final class Ref
extends java.lang.Object

Refs are the run-time representation of variables. They are simply a slot pointing to the value of the variable. Maybe they will be augmented with debugging info later on e.g. variable name.


Field Summary
 java.lang.Object value
          The value of the variable.
 
Constructor Summary
Ref()
          Constructs a new Ref with a default null value.
Ref(java.lang.Object v)
          Constructs a new Ref with the specified value.
 
Method Summary
 java.lang.Object getValue()
          Returns the value associated with this reference.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public java.lang.Object value
The value of the variable.

Constructor Detail

Ref

public Ref()
Constructs a new Ref with a default null value.


Ref

public Ref(java.lang.Object v)
Constructs a new Ref with the specified value.

Parameters:
v - the value for this reference
Method Detail

getValue

public java.lang.Object getValue()
Returns the value associated with this reference.

Returns:
this references value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.