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
serialVersionUID
static final long serialVersionUID
myName
private final String myName
myOptCreator
private transient Replacer myOptCreator
GraphParam
public GraphParam(String name,
Replacer optCreator)
- Parameters:
name
-
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?