|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.analysis.DFANode
public class DFANode
Class DFANode represents a node object to be used as workspace in any data flow analysis. The "data" map can hold any generic type of contents by mapping string-type keys to the contents. The "preds" map and the "succs" map hold edge-specific data coupled with each predecessors or successors. The keys of these two maps are useful as they are equivalent to the set of predecessors and the set of successors for the node.
| Constructor Summary | |
|---|---|
DFANode()
Constructs an empty node. |
|
DFANode(java.lang.String key,
java.lang.Object data)
Constructs a node with the specified key/data pair. |
|
| Method Summary | ||
|---|---|---|
void |
addPred(DFANode pred)
Adds a predecessor node. |
|
void |
addSucc(DFANode succ)
Adds a successor node. |
|
|
getData(java.util.List<java.lang.String> keys)
Returns the first data while searching for the specified list of keys. |
|
|
getData(java.lang.String key)
Returns the data in the node mapped by the key. |
|
java.util.Set<java.lang.String> |
getKeys()
Returns the set of keys in the satellite data map. |
|
|
getPredData(DFANode key)
Returns the predecessor data associated with the specified predecessor key. |
|
java.util.Set<DFANode> |
getPreds()
Returns the set of predecessor nodes. |
|
|
getSuccData(DFANode key)
Returns the successor data associated with the specified successor key. |
|
java.util.Set<DFANode> |
getSuccs()
Returns the set of successor nodes. |
|
void |
putData(java.lang.String key,
java.lang.Object data)
Associates the given data with the specified key. |
|
void |
putPredData(DFANode pred,
java.lang.Object value)
Adds data associated with the incoming edge from the predecessor node to this node. |
|
void |
putSuccData(DFANode succ,
java.lang.Object value)
Adds data associated with the outgoing edge from this node to the successor node. |
|
void |
removeData(java.lang.String key)
Removes the data mapped by the specified key. |
|
void |
removePred(DFANode pred)
Removes a predecessor node. |
|
void |
removeSucc(DFANode succ)
Removes a successor node. |
|
java.lang.String |
toDot(java.lang.String keys,
int num)
Returns the string in dot format that represents the node. |
|
java.lang.String |
toString()
Returns a string for the graph. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DFANode()
public DFANode(java.lang.String key,
java.lang.Object data)
key - the key string.data - the associated data.| Method Detail |
|---|
public java.util.Set<java.lang.String> getKeys()
public <T> T getData(java.lang.String key)
key - a string key.
public <T> T getData(java.util.List<java.lang.String> keys)
keys - the list of keys.
public void putData(java.lang.String key,
java.lang.Object data)
key - the key string.data - the associated data.public void removeData(java.lang.String key)
key - the key string.public java.util.Set<DFANode> getSuccs()
public java.util.Set<DFANode> getPreds()
public <T> T getSuccData(DFANode key)
key - the successor whose associated data is asked for.
public <T> T getPredData(DFANode key)
key - the predecessor whose associated data is asked for.
public void putSuccData(DFANode succ,
java.lang.Object value)
succ - the successor node.value - the associated data.
public void putPredData(DFANode pred,
java.lang.Object value)
pred - the predecessor node.value - the associated data.public void addPred(DFANode pred)
pred - the predecessor node.public void addSucc(DFANode succ)
succ - the successor node.public void removePred(DFANode pred)
pred - the predecessor node.public void removeSucc(DFANode succ)
succ - the successor node.public java.lang.String toString()
toString in class java.lang.Object
public java.lang.String toDot(java.lang.String keys,
int num)
keys - the comma-separated list of keys whose mapped data are printed.num - the number of total keys being searched for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||