|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.neu.ccs.demeter.aplib.Traversal
A compact, efficient representation of a set of paths through a class graph that can be used to guide a traversal of an object graph.
| Nested Class Summary | |
class |
Traversal.EdgeSet
A set of edges ui -l-> vj
in a traversal graph, where the edges in the set are all copies
of the same class graph edge u -l-> v with
different endpoint indices i and j. |
class |
Traversal.NodeSet
A set of nodes vi in a traversal, where the nodes in the set are all copies of the same class graph node v with different indices i. |
| Constructor Summary | |
protected |
Traversal(ClassGraphI cg)
|
| Method Summary | |
static Traversal |
compute(StrategyI S,
ClassGraphI G)
Compute the traversal determined by an encapsulated strategy and a class graph. |
static Traversal |
compute(StrategyI S,
ClassGraphI G,
NameMapI N,
ConstraintMapI B)
Compute the traversal determined by an encapsulated strategy, a class graph, a name map, and a constraint map. |
static String |
edgeKey(EdgeI e)
A unique identifying string for the given edge. |
Traversal.EdgeSet |
getAlternationEdgeSet(Object u,
Object v)
The set of copies of class graph alternation edge u => v in the traversal, or null if there are none.
|
ClassGraphI |
getClassGraph()
The class graph G used in computing this traversal. |
Traversal.EdgeSet |
getConstructionEdgeSet(Object u,
String l,
Object v)
The set of copies of class graph construction edge u -l-> v in the traversal, or null if there
are none. |
Traversal.EdgeSet |
getEdgeSet(EdgeI e)
The set of copies of class graph edge e in the traversal graph, or null if there are none. |
abstract Traversal.EdgeSet |
getEdgeSet(String key)
The set of copies of the class graph edge with the given key in the traversal, or null if there are none. |
abstract List |
getEdgeSets()
An unmodifiable list of EdgeSet objects representing the edges in the traversal. |
abstract List |
getFinishSet()
An unmodifiable List of NodeSet objects representing the finish set of the traversal (Tf). |
abstract Traversal.NodeSet |
getFinishSet(Object v)
A NodeSet representing the finish set of tokens (indices) for the class graph node v, or null if v has no finish tokens in the traversal. |
Traversal.EdgeSet |
getInheritanceEdgeSet(Object u,
Object v)
The set of copies of class graph inheritance edge u :> v in the traversal, or null if there are none.
|
abstract Traversal.NodeSet |
getNodeSet(Object v)
The set of copies of class graph node v in the traversal, or null if there are none. |
abstract List |
getNodeSets()
An unmodifiable list of NodeSet objects representing the nodes in the traversal. |
abstract List |
getStartSet()
An unmodifiable List of NodeSet objects representing the start set of the traversal (Ts). |
abstract Traversal.NodeSet |
getStartSet(Object v)
A NodeSet representing the start set of tokens (indices) for the class graph node v, or null if v has no start tokens in the traversal. |
static String |
getVersion()
The version string for this version of the AP Library. |
Traversal |
intersect(Traversal t)
The intersection of this traversal with another traversal, that is, the set of paths that are in both traversals. |
String |
toCompactString()
A string representation of the nodes and edges in the traversal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected Traversal(ClassGraphI cg)
| Method Detail |
public static String getVersion()
public static Traversal compute(StrategyI S,
ClassGraphI G)
throws TraversalException
TraversalException - if the resulting traversal graph is empty.
public static Traversal compute(StrategyI S,
ClassGraphI G,
NameMapI N,
ConstraintMapI B)
throws TraversalException
TraversalException - if:
public Traversal intersect(Traversal t)
throws IncompatibleClassGraphsException
IncompatibleClassGraphsExceptionpublic ClassGraphI getClassGraph()
public abstract List getNodeSets()
Traversal.NodeSetpublic abstract Traversal.NodeSet getNodeSet(Object v)
public abstract List getStartSet()
public abstract Traversal.NodeSet getStartSet(Object v)
public abstract List getFinishSet()
public abstract Traversal.NodeSet getFinishSet(Object v)
public abstract List getEdgeSets()
Traversal.EdgeSetpublic abstract Traversal.EdgeSet getEdgeSet(String key)
public Traversal.EdgeSet getEdgeSet(EdgeI e)
public Traversal.EdgeSet getConstructionEdgeSet(Object u,
String l,
Object v)
-l-> v in the traversal, or null if there
are none. Note that u and v may be either nodes or their string
representations.
public Traversal.EdgeSet getAlternationEdgeSet(Object u,
Object v)
=> v in the traversal, or null if there are none.
Note that u and v may be either nodes or their string
representations.
public Traversal.EdgeSet getInheritanceEdgeSet(Object u,
Object v)
:> v in the traversal, or null if there are none.
Note that u and v may be either nodes or their string
representations.
public static String edgeKey(EdgeI e)
public String toCompactString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||