Class ControlFlowGraph
java.lang.Object
org.apache.bcel.verifier.structurals.ControlFlowGraph
This class represents a control flow graph of a method.
-
Constructor Summary
ConstructorsConstructorDescriptionControlFlowGraph(MethodGen methodGen) A Control Flow Graph; with additional JustIce checksControlFlowGraph(MethodGen methodGen, boolean enableJustIceCheck) A Control Flow Graph. -
Method Summary
Modifier and TypeMethodDescriptioncontextOf(InstructionHandle inst) Returns the InstructionContext of a given instruction.contextsOf(InstructionHandle[] insts) Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.Gets an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!)booleanTests whether the instruction is unreachable, that is, whether it is absent from this ControlFlowGraph.
-
Constructor Details
-
ControlFlowGraph
A Control Flow Graph; with additional JustIce checks- Parameters:
methodGen- The method generator instance.
-
ControlFlowGraph
A Control Flow Graph.- Parameters:
methodGen- The method generator instance.enableJustIceCheck- if true, additional JustIce checks are performed.- Since:
- 6.0
-
-
Method Details
-
contextOf
Returns the InstructionContext of a given instruction.- Parameters:
inst- The instruction handle.- Returns:
- The InstructionContext of the given instruction.
-
contextsOf
Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.- Parameters:
insts- The instruction handles.- Returns:
- The InstructionContext array of the given instruction handles.
-
getInstructionContexts
Gets an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!).- Returns:
- array of InstructionContext instances.
-
isDead
Tests whether the instruction is unreachable, that is, whether it is absent from this ControlFlowGraph.- Parameters:
i- The instruction handle.- Returns:
- true if the instruction is not reachable, false otherwise.
-