public class CfgBuilder
extends Object
Builder for CFG graph.
Resulting CFG graph contains as much information as needed by current
analysis set. The amount of detail in call graph can be shrink or extend over
time. Current CfgNode inheritance tree gives an accurate understanding of
current detail level.
To build an accurate representation of control flow graph in the presence of
exceptions, we maintain all possible exit reason from statement. (This is
called completion in JLS. We use exit name in code for brevity).
CfgBuilder also tries to assign cfg node parents to correspond to AST tree
structure. This is not always correct (yet). But it is always guaranteed that
you will always meet a cfg node corresponding to containing statements when
traversing cfg node parents.
Every statement always has the corresponding node in cfg graph.
TODO: such nodes as if, etc, should be parent of their expressions.