Package org.jtool.cfg

Class CCFG

java.lang.Object
org.jtool.cfg.CCFG

public class CCFG extends Object
An object storing information on a class control flow graph (CCFG).
  • Constructor Details

    • CCFG

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

    • setEntryNode

      public void setEntryNode(CCFGEntry node)
      Sets the entry node of this CFG. This method is not intended to be invoked by clients.
      Parameters:
      node - the entry node of this CFG
    • getEntryNode

      public CCFGEntry getEntryNode()
      Returns the entry node of this CCFG.
      Returns:
      the entry node
    • getQualifiedName

      public QualifiedName getQualifiedName()
      Returns the fully qualified name of this CCFG.
      Returns:
      the fully qualified name
    • getCFG

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

      public void add(CFG cfg)
      Adds a CFG to this CCFG. This method is not intended to be invoked by clients.
      Parameters:
      cfg - the CFG to be added
    • getCFGs

      public Set<CFG> getCFGs()
      Return CFGs contained in this CCFG.
      Returns:
      the collection of the contained CFGs
    • isClass

      public boolean isClass()
      Tests if this CCFG is created from a class.
      Returns:
      true if this CCFG corresponds to a class, otherwise false
    • isInterface

      public boolean isInterface()
      Tests if this CCFG is created from an interface.
      Returns:
      true if this CCFG corresponds to an interface, otherwise false
    • isEnum

      public boolean isEnum()
      Tests if this CCFG is created from an enum class.
      Returns:
      true if this CCFG corresponds to an enum, otherwise false
    • equals

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

      public boolean equals(CCFG ccfg)
      Tests if a given CCFG is equal to this CCFG.
      Parameters:
      ccfg - the CCFG to be checked
      Returns:
      the true if the given CCFG is equal to this CCFG
    • 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