Class NodeLabeller
java.lang.Object
com.ibm.wala.cast.js.ipa.callgraph.correlations.extraction.NodeLabeller
A node labeller keeps a mapping from nodes to integers to allow consistent labelling of nodes.
- Author:
- mschaefer
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NodeLabeller
public NodeLabeller()
-
-
Method Details
-
addNode
Adds a node to the mapping if it is not present yet.- Parameters:
node
- the node to add- Returns:
- the node's label
-
getLabel
Determines the label of a node in the mapping.- Parameters:
node
- the node whose label is to be determined- Returns:
- if the node is mapped, returns its label; otherwise, returns -1
-
getNode
Determines the node associated with a given label.
-