Class NodeWithNumber

java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
All Implemented Interfaces:
INodeWithNumber
Direct Known Subclasses:
AbstractStatement, AbstractVariable, BasicBlockInContext, BasicCallGraph.NodeImpl, DexCFG.BasicBlock, InducedCFG.BasicBlock, NodeWithNumberedEdges, ShrikeCFG.BasicBlock

public class NodeWithNumber extends Object implements INodeWithNumber
A node which carries it's own number; which identifies it in a NumberedGraph implementation.

Note that a NodeWithNumber can live it at most one NumberedGraph at a time. The NumberedGraph will mutate the number here. So this is a bit fragile. Use this only if you know what you're doing.

  • Constructor Details

    • NodeWithNumber

      public NodeWithNumber()
  • Method Details

    • getGraphNodeId

      public int getGraphNodeId()
      Description copied from interface: INodeWithNumber
      A non-negative integer which serves as an identifier for this node in it's "dominant" graph. Initially this number is -1; a NumberedGraph will set it to a non-negative value when this node is inserted into the graph
      Specified by:
      getGraphNodeId in interface INodeWithNumber
      Returns:
      the number which identifies this node in the numbered graph
    • setGraphNodeId

      public void setGraphNodeId(int i)
      Specified by:
      setGraphNodeId in interface INodeWithNumber