org.erights.e.elib.tables
Class TraversalKey

java.lang.Object
  |
  +--org.erights.e.elib.tables.TraversalKey

public class TraversalKey
extends Object

Safe: Wraps a possibly unsettled base reference, in order to be able to use it as key in an EMap for purposes of traversal.

XXX This class should probably be extended to allow the traversal needed by serialization, but without revealing any encapsulated authority, as explained in the Future Work section of Safe Serialization Under Mutual Suspicion.

Author:
Mark S. Miller
See Also:
Reference Sameness

Field Summary
private  IdentityMap myFringe
          We capture the EQ pointers of these promises, after all forwardings at the time they were captured, but without following any forwardings since then.
private  int mySnapHash
           
private  Object myWrapped
           
 
Constructor Summary
TraversalKey(Object wrapped)
          Enabled:
 
Method Summary
 boolean equals(Object obj)
          Suppressed:
 int hashCode()
          Suppressed:
 String toString()
          Suppressed:
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

myWrapped

private final Object myWrapped

mySnapHash

private final int mySnapHash

myFringe

private final IdentityMap myFringe
We capture the EQ pointers of these promises, after all forwardings at the time they were captured, but without following any forwardings since then.

This works below the level of E's semantics. On a VM in which E's semantics are more primitively supported, such as one in which promise forwarding is handled automatically, TraversalKey may need a completely different implementation in order to have the same E-level semantics.

Constructor Detail

TraversalKey

public TraversalKey(Object wrapped)
Enabled:

Parameters:
wrapped -
Method Detail

equals

public boolean equals(Object obj)
Suppressed:

Overrides:
equals in class Object
Parameters:
obj -
Returns:
See Also:
Object.hashCode(), java.util.Hashtable

hashCode

public int hashCode()
Suppressed:

Overrides:
hashCode in class Object
Returns:
See Also:
java.lang.Object#equals(java.lang.Object), java.util.Hashtable

toString

public String toString()
Suppressed:

Overrides:
toString in class Object
Returns:


comments?