org.apache.bcel.verifier.structurals

## Class ControlFlowGraph

- java.lang.Object
- - org.apache.bcel.verifier.structurals.ControlFlowGraph

-     public class ControlFlowGraph
      extends Object

  This class represents a control flow graph of a method.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControlFlowGraph(MethodGen method_gen)` A Control Flow Graph; with additional JustIce checks
    `ControlFlowGraph(MethodGen method_gen, boolean enableJustIceCheck)` A Control Flow Graph.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InstructionContext` | `contextOf(InstructionHandle inst)` Returns the InstructionContext of a given instruction.
    `InstructionContext[]` | `contextsOf(InstructionHandle[] insts)` Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.
    `InstructionContext[]` | `getInstructionContexts()` Returns an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!).
    `boolean` | `isDead(InstructionHandle i)` Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ControlFlowGraph

          public ControlFlowGraph(MethodGen method_gen)

      A Control Flow Graph; with additional JustIce checks
      Parameters:
        `method_gen` - the method generator instance

    - #### ControlFlowGraph

          public ControlFlowGraph(MethodGen method_gen,
                                  boolean enableJustIceCheck)

      A Control Flow Graph.
      Parameters:
        `method_gen` - the method generator instance
        `enableJustIceCheck` - if true, additional JustIce checks are performed
      Since:
        6.0

  - ### Method Detail

    - #### contextOf

          public InstructionContext contextOf(InstructionHandle inst)

      Returns the InstructionContext of a given instruction.

    - #### contextsOf

          public InstructionContext[] contextsOf(InstructionHandle[] insts)

      Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.

    - #### getInstructionContexts

          public InstructionContext[] getInstructionContexts()

      Returns an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!).

    - #### isDead

          public boolean isDead(InstructionHandle i)

      Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph.

Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.