org.erights.e.elib.slot
Class SlotDefiner

java.lang.Object
  |
  +--org.erights.e.elib.slot.SlotDefiner
All Implemented Interfaces:
SlotGuard

public class SlotDefiner
extends Object
implements SlotGuard

Untamed: The instance, bound to the name "__defineSlot" in the initial environment, is a SlotGuard that, when asked to make a slot holding a specimen, simply returns the specimen coerced to the type 'Slot'.

This is used in the expansion of "&x" when used as a defining occurrence of "x". "&x" expands to "x :__defineSlot".

Author:
Mark S. Miller

Field Summary
static SlotDefiner THE_ONE
          Enabled:
 
Constructor Summary
private SlotDefiner()
           
 
Method Summary
 String getName()
          Enabled: "__defineSlot"
 Slot makeSlot(Object specimen, OneArgFunc optEjector)
          Enabled: @return the specimen
 String toString()
          Suppressed: Same as getName()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THE_ONE

public static final SlotDefiner THE_ONE
Enabled:

Constructor Detail

SlotDefiner

private SlotDefiner()
Method Detail

makeSlot

public Slot makeSlot(Object specimen,
                     OneArgFunc optEjector)
Enabled: @return the specimen

Specified by:
makeSlot in interface SlotGuard

getName

public String getName()
Enabled: "__defineSlot"

Specified by:
getName in interface SlotGuard

toString

public String toString()
Suppressed: Same as getName()

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?