public abstract class ExceptionTableSensitiveMethodVisitor extends MethodVisitor
MethodVisitor
that adds a callback after visiting the exception table of a method.api, mv
Modifier | Constructor and Description |
---|---|
protected |
ExceptionTableSensitiveMethodVisitor(int api,
MethodVisitor methodVisitor)
Creates an exception table sensitive method visitor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onAfterExceptionTable()
Invoked after the exception table was visited.
|
protected void |
onVisitFieldInsn(int opcode,
String owner,
String name,
String descriptor)
Visits a field instruction.
|
protected void |
onVisitIincInsn(int offset,
int increment)
Visits an increment instruction.
|
protected void |
onVisitInsn(int opcode)
Visits a simple instruction.
|
protected void |
onVisitIntInsn(int opcode,
int operand)
Visits an integer opcode.
|
protected void |
onVisitInvokeDynamicInsn(String name,
String descriptor,
Handle handle,
Object... argument)
Visits an invoke dynamic instruction.
|
protected void |
onVisitJumpInsn(int opcode,
Label label)
Visits a jump instruction.
|
protected void |
onVisitLabel(Label label)
Visits a label.
|
protected void |
onVisitLdcInsn(Object constant)
Visits a constant pool access instruction.
|
protected void |
onVisitLookupSwitchInsn(Label defaultTarget,
int[] keys,
Label[] key)
Visits a lookup switch instruction.
|
protected void |
onVisitMethodInsn(int opcode,
String owner,
String name,
String descriptor)
Deprecated.
|
protected void |
onVisitMethodInsn(int opcode,
String owner,
String name,
String descriptor,
boolean iFace)
Visits a method instruction.
|
protected void |
onVisitMultiANewArrayInsn(String descriptor,
int dimensions)
Visits an instruction for creating a multidimensional array.
|
protected void |
onVisitTableSwitchInsn(int min,
int max,
Label defaultTarget,
Label... label)
Visits a table switch instruction.
|
protected void |
onVisitTypeInsn(int opcode,
String type)
Visits a type instruction.
|
protected void |
onVisitVarInsn(int opcode,
int offset)
Visits an variable instruction.
|
void |
visitFieldInsn(int opcode,
String owner,
String name,
String desc) |
void |
visitIincInsn(int var,
int increment) |
void |
visitInsn(int opcode) |
void |
visitIntInsn(int opcode,
int operand) |
void |
visitInvokeDynamicInsn(String name,
String desc,
Handle bsm,
Object... bsmArgs) |
void |
visitJumpInsn(int opcode,
Label label) |
void |
visitLabel(Label label) |
void |
visitLdcInsn(Object cst) |
void |
visitLookupSwitchInsn(Label dflt,
int[] keys,
Label[] labels) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String desc) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String desc,
boolean iFace) |
void |
visitMultiANewArrayInsn(String desc,
int dims) |
void |
visitTableSwitchInsn(int min,
int max,
Label dflt,
Label... labels) |
void |
visitTypeInsn(int opcode,
String type) |
void |
visitVarInsn(int opcode,
int var) |
visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitInsnAnnotation, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation
protected ExceptionTableSensitiveMethodVisitor(int api, MethodVisitor methodVisitor)
api
- The ASM API version.methodVisitor
- The delegating method visitor.protected abstract void onAfterExceptionTable()
public final void visitLabel(Label label)
visitLabel
in class MethodVisitor
protected void onVisitLabel(Label label)
label
- The visited label.MethodVisitor.visitLabel(Label)
public final void visitIntInsn(int opcode, int operand)
visitIntInsn
in class MethodVisitor
protected void onVisitIntInsn(int opcode, int operand)
opcode
- The visited opcode.operand
- The visited operand.public final void visitVarInsn(int opcode, int var)
visitVarInsn
in class MethodVisitor
protected void onVisitVarInsn(int opcode, int offset)
opcode
- The visited opcode.offset
- The visited offset.public final void visitTypeInsn(int opcode, String type)
visitTypeInsn
in class MethodVisitor
protected void onVisitTypeInsn(int opcode, String type)
opcode
- The visited opcode.type
- The type name.public final void visitFieldInsn(int opcode, String owner, String name, String desc)
visitFieldInsn
in class MethodVisitor
protected void onVisitFieldInsn(int opcode, String owner, String name, String descriptor)
opcode
- The visited opcode.owner
- The field's owner.name
- The field's name.descriptor
- The field's descriptor.public final void visitMethodInsn(int opcode, String owner, String name, String desc)
visitMethodInsn
in class MethodVisitor
@Deprecated protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor)
onVisitMethodInsn(int, String, String, String, boolean)
instead.opcode
- The visited opcode.owner
- The method's owner.name
- The method's internal name.descriptor
- The method's descriptor.public final void visitMethodInsn(int opcode, String owner, String name, String desc, boolean iFace)
visitMethodInsn
in class MethodVisitor
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor, boolean iFace)
opcode
- The visited opcode.owner
- The method's owner.name
- The method's internal name.descriptor
- The method's descriptor.iFace
- true
if the method belongs to an interface.public final void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs)
visitInvokeDynamicInsn
in class MethodVisitor
protected void onVisitInvokeDynamicInsn(String name, String descriptor, Handle handle, Object... argument)
name
- The name of the method.descriptor
- The descriptor of the method.handle
- The bootstrap method handle.argument
- The bootstrap method arguments.public final void visitJumpInsn(int opcode, Label label)
visitJumpInsn
in class MethodVisitor
protected void onVisitJumpInsn(int opcode, Label label)
opcode
- The visited opcode.label
- The visited label.public final void visitLdcInsn(Object cst)
visitLdcInsn
in class MethodVisitor
protected void onVisitLdcInsn(Object constant)
constant
- The constant pool value.public final void visitIincInsn(int var, int increment)
visitIincInsn
in class MethodVisitor
protected void onVisitIincInsn(int offset, int increment)
offset
- The offset of the accessed variable.increment
- The value with which to increment.public final void visitTableSwitchInsn(int min, int max, Label dflt, Label... labels)
visitTableSwitchInsn
in class MethodVisitor
protected void onVisitTableSwitchInsn(int min, int max, Label defaultTarget, Label... label)
min
- The minimum index.max
- The maximum index.defaultTarget
- A label indicating the default value.label
- Labels indicating the jump targets.public final void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
visitLookupSwitchInsn
in class MethodVisitor
protected void onVisitLookupSwitchInsn(Label defaultTarget, int[] keys, Label[] key)
defaultTarget
- The default option.keys
- The key values.key
- The targets for each key.public final void visitMultiANewArrayInsn(String desc, int dims)
visitMultiANewArrayInsn
in class MethodVisitor
protected void onVisitMultiANewArrayInsn(String descriptor, int dimensions)
descriptor
- The type descriptor of the array's component type.dimensions
- The dimensions of the array.public final void visitInsn(int opcode)
visitInsn
in class MethodVisitor
protected void onVisitInsn(int opcode)
opcode
- The opcode of the instruction.Copyright © 2014–2018. All rights reserved.