Class Value

java.lang.Object
  extended byValue
Direct Known Subclasses:
LValue

public class Value
extends java.lang.Object

Class Value is the representation of a "tagged value", as employed in interpreters that perform runtime type checking. A tagged value consists of a generic value field, of type Object, and a type field, of type TypeNode.


Field Summary
 TypeNode type
          The type-tag field
 java.lang.Object val
          The value field
 
Constructor Summary
Value(java.lang.Object val, TypeNode type)
          Construct this with the given value and type.
 
Method Summary
 java.lang.String toString()
          Return the string representation of this as the toString of its value and type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

val

public java.lang.Object val
The value field


type

public TypeNode type
The type-tag field

Constructor Detail

Value

public Value(java.lang.Object val,
             TypeNode type)
Construct this with the given value and type.

Method Detail

toString

public java.lang.String toString()
Return the string representation of this as the toString of its value and type. The two components are are separate lines, and prefixed with "val: " and "type: ", respectivey.