Class BetterCFGBuilder2

java.lang.Object
edu.umd.cs.findbugs.ba.BetterCFGBuilder2
All Implemented Interfaces:
CFGBuilder, Debug, EdgeTypes

public class BetterCFGBuilder2 extends Object implements CFGBuilder, EdgeTypes, Debug
A CFGBuilder that really tries to construct accurate control flow graphs. The CFGs it creates have accurate exception edges, and have accurately inlined JSR subroutines.
Author:
David Hovemeyer
See Also:
  • Constructor Details

    • BetterCFGBuilder2

      public BetterCFGBuilder2(@Nonnull MethodDescriptor descriptor, @Nonnull org.apache.bcel.generic.MethodGen methodGen)
      Constructor.
      Parameters:
      methodGen - the method to build a CFG for
  • Method Details

    • getIndex

      public int getIndex(FieldDescriptor f)
    • optimize

      public void optimize(org.apache.bcel.generic.InstructionList instructionList)
    • build

      public void build() throws CFGBuilderException
      Description copied from interface: CFGBuilder
      Build the CFG.
      Specified by:
      build in interface CFGBuilder
      Throws:
      CFGBuilderException
    • getCFG

      public CFG getCFG()
      Description copied from interface: CFGBuilder
      Get the CFG built by this object. Assumes that the build() method has already been called.
      Specified by:
      getCFG in interface CFGBuilder
      Returns:
      the CFG
    • inline

      public void inline(edu.umd.cs.findbugs.ba.BetterCFGBuilder2.Context context) throws CFGBuilderException
      Inline a subroutine into a calling context.
      Parameters:
      context - the Context
      Throws:
      CFGBuilderException
    • main

      public static void main(String[] argv) throws Exception
      Test driver.
      Throws:
      Exception