Package org.jtool.pdg

Class ClDG

java.lang.Object
org.jtool.pdg.ClDG

public class ClDG extends Object
An object storing information on a class dependence graph (ClDG) for a class.
  • Constructor Details

    • ClDG

      public ClDG()
      Creates a new, empty object for storing a ClDG information. This method is not intended to be invoked by clients.
  • Method Details

    • setEntryNode

      public void setEntryNode(ClDGEntry node)
      Sets the entry node for this ClDG. This method is not intended to be invoked by clients.
      Parameters:
      node - the entry node to be set
    • getEntryNode

      public ClDGEntry getEntryNode()
      Returns the entry node for this ClDG.
      Returns:
      the entry node
    • addClassMemberEdge

      public void addClassMemberEdge(InterPDGCD edge)
      Adds an edge between a class and its member.
      Parameters:
      edge - an edge to be added
    • getInterPDGCDs

      public List<InterPDGCD> getInterPDGCDs()
      Obtains edges between a class and its members.
      Returns:
      the collection of the edges
    • getNodes

      public Set<PDGNode> getNodes()
      Returns all nodes of this ClDG.
      Returns:
      the collection of the nodes
    • getEdges

      public List<DependencyGraphEdge> getEdges()
      Returns all edges of this ClDG.
      Returns:
      the collection of the edges
    • getQualifiedName

      public QualifiedName getQualifiedName()
      Returns the fully qualified name of this ClDG.
      Returns:
      the fully qualified name
    • getPDG

      public PDG getPDG(String fqn)
      Returns a PDG that has a given name.
      Parameters:
      fqn - the fully-qualified name of the PDG to be retrieved
      Returns:
      the found PDG, or null if no PDGis found
    • add

      public void add(PDG pdg)
      Adds a PDG to this ClDG. This method is not intended to be invoked by clients.
      Parameters:
      pdg - the PDG to be added
    • getPDGs

      public Set<PDG> getPDGs()
      Return PDGs contained in this ClDG.
      Returns:
      the collection of the contained PDGs
    • getCCFG

      public CCFG getCCFG()
      Returns the CCFG corresponding to this ClDG.
      Returns:
      the CCFG, or null if the corresponding CCFG does not exist
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(ClDG cldg)
      Tests if a given ClDG is equal to this ClDG.
      Parameters:
      cldg - the ClDG to be checked
      Returns:
      the true if the given ClDG is equal to this ClDG
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • print

      public void print()
      Displays information on this graph.
    • toString

      public String toString()
      Obtains information on this CCFG.
      Overrides:
      toString in class Object
      Returns:
      the string representing the information