Package org.jtool.pdg
Class ClDG
java.lang.Object
org.jtool.pdg.ClDG
An object storing information on a class dependence graph (ClDG) for a class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a PDG to this ClDG.void
addClassMemberEdge
(InterPDGCD edge) Adds an edge between a class and its member.boolean
boolean
Tests if a given ClDG is equal to this ClDG.getCCFG()
Returns the CCFG corresponding to this ClDG.getEdges()
Returns all edges of this ClDG.Returns the entry node for this ClDG.Obtains edges between a class and its members.getNodes()
Returns all nodes of this ClDG.Returns a PDG that has a given name.getPDGs()
Return PDGs contained in this ClDG.Returns the fully qualified name of this ClDG.int
hashCode()
void
print()
Displays information on this graph.void
setEntryNode
(ClDGEntry node) Sets the entry node for this ClDG.toString()
Obtains information on this CCFG.
-
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
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
Returns the entry node for this ClDG.- Returns:
- the entry node
-
addClassMemberEdge
Adds an edge between a class and its member.- Parameters:
edge
- an edge to be added
-
getInterPDGCDs
Obtains edges between a class and its members.- Returns:
- the collection of the edges
-
getNodes
Returns all nodes of this ClDG.- Returns:
- the collection of the nodes
-
getEdges
Returns all edges of this ClDG.- Returns:
- the collection of the edges
-
getQualifiedName
Returns the fully qualified name of this ClDG.- Returns:
- the fully qualified name
-
getPDG
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
Adds a PDG to this ClDG. This method is not intended to be invoked by clients.- Parameters:
pdg
- the PDG to be added
-
getPDGs
Return PDGs contained in this ClDG.- Returns:
- the collection of the contained PDGs
-
getCCFG
Returns the CCFG corresponding to this ClDG.- Returns:
- the CCFG, or
null
if the corresponding CCFG does not exist
-
equals
-
equals
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() -
print
public void print()Displays information on this graph. -
toString
Obtains information on this CCFG.
-