|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.neu.ccs.demeter.dj.ObjectGraph
A graph whose nodes are objects and whose edges are part-of relationships (properties), with a single distinguished root object. An object graph has a class graph to which it conforms.
| Field Summary | |
protected ClassGraph |
cg
|
protected Object |
root
|
| Constructor Summary | |
ObjectGraph(Object o,
ClassGraph c)
The object graph rooted at o with respect to c. |
|
| Method Summary | |
List |
asList(Strategy s)
View (without copying) the objects in the object graph corresponding to the target of s as a List. |
List |
asList(String s)
View (without copying) the objects in the object graph corresponding to the target of strategy s as a List. |
Object |
fetch(Strategy s)
Fetch the object in the object graph corresponding to the target of s. |
Object |
fetch(String s)
Fetch the object in the object graph corresponding to the target of stragegy s. |
List |
gather(Strategy s)
Gather (copy) the objects in the object graph corresponding to the target of s into a List. |
List |
gather(String s)
Gather (copy) the objects in the object graph corresponding to the target of strategy s into a List. |
ClassGraph |
getClassGraph()
The class graph that this object graph is an instance of. |
Object |
getRoot()
The root of the graph. |
ObjectGraphSlice |
slice(Strategy s)
The subgraph of the object graph determined by s. |
ObjectGraphSlice |
slice(String s)
The subgraph of the object graph determined by strategy s. |
Object |
traverse(Strategy s,
Visitor v)
Traverse the subgraph of the object graph determined by s using v, returning the value of v.getReturnValue() at the end of the traversal. |
Object |
traverse(Strategy s,
Visitor[] v)
Traverse the subgraph of the object graph determined by s using visitors in array v in parallel, returning the value of v[0].getReturnValue() at the end of the traversal. |
Object |
traverse(String s,
Visitor v)
Traverse the subgraph of the object graph determined by strategy s using v, returning the value of v.getReturnValue() at the end of the traversal. |
Object |
traverse(String s,
Visitor[] v)
Traverse the subgraph of the object graph determined by strategy s using visitors in array v in parallel, returning the value of v[0].getReturnValue() at the end of the traversal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ClassGraph cg
protected Object root
| Constructor Detail |
public ObjectGraph(Object o,
ClassGraph c)
| Method Detail |
public ClassGraph getClassGraph()
public Object getRoot()
public ObjectGraphSlice slice(Strategy s)
public Object traverse(Strategy s,
Visitor v)
public Object traverse(Strategy s,
Visitor[] v)
public Object fetch(Strategy s)
throws FetchException
FetchExceptionpublic List gather(Strategy s)
public List asList(Strategy s)
public ObjectGraphSlice slice(String s)
public Object traverse(String s,
Visitor v)
public Object traverse(String s,
Visitor[] v)
public Object fetch(String s)
throws FetchException
FetchExceptionpublic List gather(String s)
public List asList(String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||