de.uka.ipd.sdq.ByCounter.parsing
Class BasicBlockAnalyser

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.parsing.BasicBlockAnalyser
All Implemented Interfaces:
IInstructionAnalyser

public final class BasicBlockAnalyser
extends java.lang.Object
implements IInstructionAnalyser

An implementation of IInstructionAnalyser that analyses instructions in order to find basicBlocks. The results of this IInstructionAnalyser can be queried with the method InstrumentationState.getBasicBlockLabels().


Constructor Summary
BasicBlockAnalyser(java.lang.String methodDescriptorString, InstrumentationState instrumentationState)
          Construct the basic block analyser.
 
Method Summary
 void analyseInstruction(org.objectweb.asm.tree.AbstractInsnNode insn)
          Analyse the given instruction.
 void analyseTryCatchBlock(org.objectweb.asm.tree.TryCatchBlockNode tryCatchNode)
          Analyse the given try catch node.
 void postAnalysisEvent(org.objectweb.asm.tree.InsnList instructions)
          Called after all instructions have been individually analysed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBlockAnalyser

public BasicBlockAnalyser(java.lang.String methodDescriptorString,
                          InstrumentationState instrumentationState)
Construct the basic block analyser. Needed before each method.

Parameters:
methodDescriptorString - Descriptor of the analysed method.
instrumentationState - Structure for instrumentation results.
Method Detail

analyseInstruction

public void analyseInstruction(org.objectweb.asm.tree.AbstractInsnNode insn)
Analyse the given instruction.

Specified by:
analyseInstruction in interface IInstructionAnalyser
Parameters:
insn - Instruction as encountered in a method.

analyseTryCatchBlock

public void analyseTryCatchBlock(org.objectweb.asm.tree.TryCatchBlockNode tryCatchNode)
Analyse the given try catch node.

Specified by:
analyseTryCatchBlock in interface IInstructionAnalyser
Parameters:
tryCatchNode - Try catch node as encountered in a method.

postAnalysisEvent

public void postAnalysisEvent(org.objectweb.asm.tree.InsnList instructions)
Called after all instructions have been individually analysed.

Specified by:
postAnalysisEvent in interface IInstructionAnalyser
Parameters:
instructions - Complete list of instructions.