org.jacoco.core.instr
Class BlockMethodAdapter
java.lang.Object
org.objectweb.asm.tree.MemberNode
org.objectweb.asm.tree.MethodNode
org.jacoco.core.instr.BlockMethodAdapter
- All Implemented Interfaces:
- MethodVisitor
public final class BlockMethodAdapter
- extends MethodNode
A method visitor that determines block boundaries and reports them to the
wrapped IBlockMethodVisitor
. The implementation first buffers the
content of the method to extract all control flow target labels. At the end
of the method it flushes the content to the IBlockMethodVisitor
.
- Version:
- $Revision: $
- Author:
- Marc R. Hoffmann
Fields inherited from class org.objectweb.asm.tree.MethodNode |
access, annotationDefault, desc, exceptions, instructions, invisibleParameterAnnotations, localVariables, maxLocals, maxStack, name, signature, tryCatchBlocks, visibleParameterAnnotations |
Methods inherited from class org.objectweb.asm.tree.MethodNode |
accept, accept, getLabelNode, visitAnnotationDefault, visitCode, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitMaxs, visitMethodInsn, visitMultiANewArrayInsn, visitParameterAnnotation, visitTypeInsn, visitVarInsn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockMethodAdapter
public BlockMethodAdapter(IBlockMethodVisitor blockVisitor,
org.jacoco.core.instr.IProbeIdGenerator idGenerator,
int access,
String name,
String desc,
String signature,
String[] exceptions)
- Create a new adapter for the given block visitor.
- Parameters:
blockVisitor
- visitor to report block boundaries toidGenerator
- generator for probe idsaccess
- the method's access flagsname
- the method's name.desc
- the method's descriptorsignature
- the method's signature. May be null.exceptions
- the internal names of the method's exception classes. May be
null.
visitJumpInsn
public void visitJumpInsn(int opcode,
Label label)
- Specified by:
visitJumpInsn
in interface MethodVisitor
- Overrides:
visitJumpInsn
in class MethodNode
visitTableSwitchInsn
public void visitTableSwitchInsn(int min,
int max,
Label dflt,
Label[] labels)
- Specified by:
visitTableSwitchInsn
in interface MethodVisitor
- Overrides:
visitTableSwitchInsn
in class MethodNode
visitLookupSwitchInsn
public void visitLookupSwitchInsn(Label dflt,
int[] keys,
Label[] labels)
- Specified by:
visitLookupSwitchInsn
in interface MethodVisitor
- Overrides:
visitLookupSwitchInsn
in class MethodNode
visitTryCatchBlock
public void visitTryCatchBlock(Label start,
Label end,
Label handler,
String type)
- Specified by:
visitTryCatchBlock
in interface MethodVisitor
- Overrides:
visitTryCatchBlock
in class MethodNode
visitEnd
public void visitEnd()
- Specified by:
visitEnd
in interface MethodVisitor
- Overrides:
visitEnd
in class MemberNode