org.millscript.millscript.datatypes
Class SpiceObject

java.lang.Object
  extended by org.millscript.millscript.datatypes.SpiceObject

public final class SpiceObject
extends java.lang.Object

This class represents an instance of a Spice class.


Constructor Summary
SpiceObject(SpiceClass sc)
          Constructs a new Spice object instance, for the specified class.
 
Method Summary
 java.lang.Object getSlotValue(SlotFunction sf)
          Returns the value of the specified slot.
 SpiceClass getSpiceClass()
          Returns the SpiceClass this object is an instance of.
 void initialiseSlotValue(SlotFunction sf, java.lang.Object value)
          Initialises the specified slot with the specified value.
 java.lang.String toString()
          Returns a string describing this Spice object.
 void updateSlotValue(SlotFunction sf, java.lang.Object value)
          Updates the value of the specified slot with the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpiceObject

public SpiceObject(SpiceClass sc)
Constructs a new Spice object instance, for the specified class.

Parameters:
sc - the class this object is an instance of
Method Detail

getSlotValue

public java.lang.Object getSlotValue(SlotFunction sf)
Returns the value of the specified slot.

Parameters:
sf - the slot accessor function for the required slot
Returns:
the value of the specified slot

getSpiceClass

public SpiceClass getSpiceClass()
Returns the SpiceClass this object is an instance of.

Returns:
the SpiceClass this object is an instance of

initialiseSlotValue

public void initialiseSlotValue(SlotFunction sf,
                                java.lang.Object value)
Initialises the specified slot with the specified value.

Parameters:
sf - the slot to initialise
value - the value to initialise the slot with

updateSlotValue

public void updateSlotValue(SlotFunction sf,
                            java.lang.Object value)
Updates the value of the specified slot with the specified value.

Parameters:
sf - the slot to update
value - the new value for the specified slot

toString

public java.lang.String toString()
Returns a string describing this Spice object.

Overrides:
toString in class java.lang.Object
Returns:
a String describing this Spice object


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