org.erights.e.extern.persist
Class GraphParam

java.lang.Object
  |
  +--org.erights.e.extern.persist.GraphParam
All Implemented Interfaces:
Marker, Persistent, Serializable

final class GraphParam
extends Object
implements Persistent

Represents the objects at the perimeter of a graph being serialized, and likewise represents the parameter names for parameterizing this same subgraph when unserializing.

Let's say Alice points at Bob and Bob is in known by the name "Bob" in a scalpel table. If Alice is then serialized using this scalpel, her pointer to Bob gets serialized instead as a pointer to a GraphParam("Bob").

On revival, when GraphParam("Bob") is unserialized, "Bob" is immediately looked up in the corresponding suture table, and the resulting value substituted for GraphParam("Bob"). The new incarnation of Alice has a right to the new Bob by virtue of holding a GraphParam("Bob") object which demonstrates her earlier incarnation was holding the object known as "Bob" in the earlier corresponding scalpel table.

The ability to create GraphParam objects must therefore be closely held by trusted code, and a GraphParam created by one Replacer must not be recognized by another Replacer, because otherwise one would use a GraphParam generated using one scalpel table in a context assuming another one was used.

Author:
Mark S. Miller

Field Summary
private  String myName
           
private  Replacer myOptCreator
           
(package private) static long serialVersionUID
           
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
GraphParam(String name, Replacer optCreator)
           
 
Method Summary
 String getName()
           
 Replacer getOptCreator()
           
 String toString()
          Suppressed: Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

myName

private final String myName

myOptCreator

private transient Replacer myOptCreator
Constructor Detail

GraphParam

public GraphParam(String name,
                  Replacer optCreator)
Parameters:
name -
Method Detail

getName

public String getName()
Returns:

getOptCreator

public Replacer getOptCreator()
Returns:

toString

public String toString()
Description copied from class: Object
Suppressed: Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

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


comments?