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 |
onVisitFrame(int type,
int localVariableLength,
Object[] localVariable,
int stackSize,
Object[] stack)
Visits a stack map frame.
|
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[] key,
Label[] label)
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 isInterface)
Visits a method instruction.
|
protected void |
onVisitMultiANewArrayInsn(String descriptor,
int dimensions)
Visits an instruction for creating a multidimensional array.
|
protected void |
onVisitTableSwitchInsn(int minimum,
int maximum,
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 descriptor) |
void |
visitFrame(int type,
int localVariableLength,
Object[] localVariable,
int stackSize,
Object[] stack) |
void |
visitIincInsn(int offset,
int increment) |
void |
visitInsn(int opcode) |
void |
visitIntInsn(int opcode,
int operand) |
void |
visitInvokeDynamicInsn(String name,
String descriptor,
Handle handle,
Object... argument) |
void |
visitJumpInsn(int opcode,
Label label) |
void |
visitLabel(Label label) |
void |
visitLdcInsn(Object constant) |
void |
visitLookupSwitchInsn(Label dflt,
int[] key,
Label[] label) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String descriptor) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String descriptor,
boolean isInterface) |
void |
visitMultiANewArrayInsn(String descriptor,
int dimensions) |
void |
visitTableSwitchInsn(int minimum,
int maximum,
Label defaultTarget,
Label... label) |
void |
visitTypeInsn(int opcode,
String type) |
void |
visitVarInsn(int opcode,
int offset) |
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, 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 visitFrame(int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)
visitFrame
in class MethodVisitor
protected void onVisitFrame(int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)
type
- The type of stack map frame.localVariableLength
- The length of the local variable array.localVariable
- An array containing type symbols for all values in the local variable array.stackSize
- The size of the operand stack.stack
- An array containing type symbols for all values on the operand stack.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 offset)
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 descriptor)
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 descriptor)
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 descriptor, boolean isInterface)
visitMethodInsn
in class MethodVisitor
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface)
opcode
- The visited opcode.owner
- The method's owner.name
- The method's internal name.descriptor
- The method's descriptor.isInterface
- true
if the method belongs to an interface.public final void visitInvokeDynamicInsn(String name, String descriptor, Handle handle, Object... argument)
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 constant)
visitLdcInsn
in class MethodVisitor
protected void onVisitLdcInsn(Object constant)
constant
- The constant pool value.public final void visitIincInsn(int offset, 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 minimum, int maximum, Label defaultTarget, Label... label)
visitTableSwitchInsn
in class MethodVisitor
protected void onVisitTableSwitchInsn(int minimum, int maximum, Label defaultTarget, Label... label)
minimum
- The minimum index.maximum
- The maximum index.defaultTarget
- A label indicating the default value.label
- Labels indicating the jump targets.public final void visitLookupSwitchInsn(Label dflt, int[] key, Label[] label)
visitLookupSwitchInsn
in class MethodVisitor
protected void onVisitLookupSwitchInsn(Label defaultTarget, int[] key, Label[] label)
defaultTarget
- The default option.key
- The key values.label
- The targets for each key.public final void visitMultiANewArrayInsn(String descriptor, int dimensions)
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–2025. All rights reserved.