Top Description Fields Constructors Methods
net.bytebuddy.utility.visitor

public abstract Class ExceptionTableSensitiveMethodVisitor

extends MethodVisitor
Class Inheritance
Known Direct Subclasses
net.bytebuddy.utility.visitor.LineNumberPrependingMethodVisitor, net.bytebuddy.asm.Advice.AdviceVisitor
Imports
net.bytebuddy.jar.asm.Handle, .Label, .MethodVisitor

A MethodVisitor that adds a callback after visiting the exception table of a method.

Field Summary

Modifier and TypeField and Description
private boolean
trigger

true if the exception table callback was already triggered.

Inherited from net.bytebuddy.jar.asm.MethodVisitor:
apimv

Constructor Summary

AccessConstructor and Description
protected
ExceptionTableSensitiveMethodVisitor(int
The ASM API version.
api
,
MethodVisitor
The delegating method visitor.
methodVisitor
)

Creates an exception table sensitive method visitor.

Method Summary

Modifier and TypeMethod and Description
private void
considerEndOfExceptionTable()

Considers if the end of the exception table was reached.

protected abstract void
onAfterExceptionTable()

Invoked after the exception table was visited.

protected void
onVisitFieldInsn(int
The visited opcode.
opcode
,
String
The field's owner.
owner
,
String
The field's name.
name
,
String
The field's descriptor.
descriptor
)

Visits a field instruction.

protected void
onVisitFrame(int
The type of stack map frame.
type
,
int
The length of the local variable array.
localVariableLength
,
Object[]
An array containing type symbols for all values in the local variable array.
localVariable
,
int
The size of the operand stack.
stackSize
,
Object[]
An array containing type symbols for all values on the operand stack.
stack
)

Visits a stack map frame.

protected void
onVisitIincInsn(int
The offset of the accessed variable.
offset
,
int
The value with which to increment.
increment
)

Visits an increment instruction.

protected void
onVisitInsn(int
The opcode of the instruction.
opcode
)

Visits a simple instruction.

protected void
onVisitIntInsn(int
The visited opcode.
opcode
,
int
The visited operand.
operand
)

Visits an integer opcode.

protected void
onVisitInvokeDynamicInsn(String
The name of the method.
name
,
String
The descriptor of the method.
descriptor
,
Handle
The bootstrap method handle.
handle
,
Object...
The bootstrap method arguments.
argument
)

Visits an invoke dynamic instruction.

protected void
onVisitJumpInsn(int
The visited opcode.
opcode
,
Label
The visited label.
label
)

Visits a jump instruction.

protected void
onVisitLabel(Label
The visited label.
label
)

Visits a label.

protected void
onVisitLdcInsn(Object
The constant pool value.
constant
)

Visits a constant pool access instruction.

protected void
onVisitLookupSwitchInsn(Label
The default option.
defaultTarget
,
int[]
The key values.
key
,
Label[]
The targets for each key.
label
)

Visits a lookup switch instruction.

protected void
onVisitMethodInsn(int
The visited opcode.
opcode
,
String
The method's owner.
owner
,
String
The method's internal name.
name
,
String
The method's descriptor.
descriptor
)

Visits a method instruction.
protected void
onVisitMethodInsn(int
The visited opcode.
opcode
,
String
The method's owner.
owner
,
String
The method's internal name.
name
,
String
The method's descriptor.
descriptor
,
boolean
true if the method belongs to an interface.
isInterface
)

Visits a method instruction.

protected void
onVisitMultiANewArrayInsn(String
The type descriptor of the array's component type.
descriptor
,
int
The dimensions of the array.
dimensions
)

Visits an instruction for creating a multidimensional array.

protected void
onVisitTableSwitchInsn(int
The minimum index.
minimum
,
int
The maximum index.
maximum
,
Label
A label indicating the default value.
defaultTarget
,
Label...
Labels indicating the jump targets.
label
)

Visits a table switch instruction.

protected void
onVisitTypeInsn(int
The visited opcode.
opcode
,
String
The type name.
type
)

Visits a type instruction.

protected void
onVisitVarInsn(int
The visited opcode.
opcode
,
int
The visited offset.
offset
)

Visits an variable instruction.

public final void
visitFieldInsn(int
the opcode of the type instruction to be visited. This opcode is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.
opcode
,
String
the internal name of the field's owner class (see Type#getInternalName()).
owner
,
String
the field's name.
name
,
String
the field's descriptor (see Type).
descriptor
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitFieldInsn.

Visits a field instruction.
public final void
visitFrame(int
the type of this stack map frame. Must be Opcodes#F_NEW for expanded frames, or Opcodes#F_FULL, Opcodes#F_APPEND, Opcodes#F_CHOP, Opcodes#F_SAME or Opcodes#F_APPEND, Opcodes#F_SAME1 for compressed frames.
type
,
int
the number of local variables in the visited frame. Long and double values count for one variable.
localVariableLength
,
Object[]
the local variable types in this frame. This array must not be modified. Primitive types are represented by Opcodes#TOP, Opcodes#INTEGER, Opcodes#FLOAT, Opcodes#LONG, Opcodes#DOUBLE, Opcodes#NULL or Opcodes#UNINITIALIZED_THIS (long and double are represented by a single element). Reference types are represented by String objects (representing internal names, see Type#getInternalName()), and uninitialized types by Label objects (this label designates the NEW instruction that created this uninitialized value).
localVariable
,
int
the number of operand stack elements in the visited frame. Long and double values count for one stack element.
stackSize
,
Object[]
the operand stack types in this frame. This array must not be modified. Its content has the same format as the "local" array.
stack
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitFrame.

Visits the current state of the local variables and operand stack elements.
public final void
visitIincInsn(int
index of the local variable to be incremented.
offset
,
int
amount to increment the local variable by.
increment
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitIincInsn.

Visits an IINC instruction.
public final void
visitInsn(int
the opcode of the instruction to be visited. This opcode is either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT.
opcode
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitInsn.

Visits a zero operand instruction.
public final void
visitIntInsn(int
the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.
opcode
,
int
the operand of the instruction to be visited.
When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
When opcode is NEWARRAY, operand value should be one of Opcodes#T_BOOLEAN, Opcodes#T_CHAR, Opcodes#T_FLOAT, Opcodes#T_DOUBLE, Opcodes#T_BYTE, Opcodes#T_SHORT, Opcodes#T_INT or Opcodes#T_LONG.
operand
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitIntInsn.

Visits an instruction with a single int operand.
public final void
visitInvokeDynamicInsn(String
the method's name.
name
,
String
the method's descriptor (see Type).
descriptor
,
Handle
the bootstrap method.
handle
,
Object...
the bootstrap method constant arguments. Each argument must be an Integer, Float, Long, Double, String, Type, Handle or ConstantDynamic value. This method is allowed to modify the content of the array so a caller should expect that this array may change.
argument
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitInvokeDynamicInsn.

Visits an invokedynamic instruction.
public final void
visitJumpInsn(int
the opcode of the type instruction to be visited. This opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.
opcode
,
Label
the operand of the instruction to be visited. This operand is a label that designates the instruction to which the jump instruction may jump.
label
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitJumpInsn.

Visits a jump instruction.
public final void
visitLabel(Label
a Label object.
label
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLabel.

Visits a label.
public final void
visitLdcInsn(Object
the constant to be loaded on the stack. This parameter must be a non null Integer, a Float, a Long, a Double, a String, a Type of OBJECT or ARRAY sort for .class constants, for classes whose version is 49, a Type of METHOD sort for MethodType, a Handle for MethodHandle constants, for classes whose version is 51 or a ConstantDynamic for a constant dynamic for classes whose version is 55.
constant
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLdcInsn.

Visits a LDC instruction.
public final void
visitLookupSwitchInsn(Label
beginning of the default handler block.
dflt
,
int[]
the values of the keys.
key
,
Label[]
beginnings of the handler blocks. labels[i] is the beginning of the handler block for the keys[i] key.
label
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLookupSwitchInsn.

Visits a LOOKUPSWITCH instruction.
public final void
visitMethodInsn(int
the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.
opcode
,
String
the internal name of the method's owner class (see Type#getInternalName()).
owner
,
String
the method's name.
name
,
String
the method's descriptor (see Type).
descriptor
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction.
public final void
visitMethodInsn(int
the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.
opcode
,
String
the internal name of the method's owner class (see Type#getInternalName()).
owner
,
String
the method's name.
name
,
String
the method's descriptor (see Type).
descriptor
,
boolean
if the method's owner class is an interface.
isInterface
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction.
public final void
visitMultiANewArrayInsn(String
an array type descriptor (see Type).
descriptor
,
int
the number of dimensions of the array to allocate.
dimensions
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMultiANewArrayInsn.

Visits a MULTIANEWARRAY instruction.
public final void
visitTableSwitchInsn(int
the minimum key value.
minimum
,
int
the maximum key value.
maximum
,
Label
beginning of the default handler block.
defaultTarget
,
Label...
beginnings of the handler blocks. labels[i] is the beginning of the handler block for the min + i key.
label
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitTableSwitchInsn.

Visits a TABLESWITCH instruction.
public final void
visitTypeInsn(int
the opcode of the type instruction to be visited. This opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.
opcode
,
String
the operand of the instruction to be visited. This operand must be the internal name of an object or array class (see Type#getInternalName()).
type
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitTypeInsn.

Visits a type instruction.
public final void
visitVarInsn(int
the opcode of the local variable instruction to be visited. This opcode is either ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.
opcode
,
int
the operand of the instruction to be visited. This operand is the index of a local variable.
offset
)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitVarInsn.

Visits a local variable instruction.
Inherited from net.bytebuddy.jar.asm.MethodVisitor:
getDelegatevisitAnnotableParameterCountvisitAnnotationvisitAnnotationDefaultvisitAttributevisitCodevisitEndvisitInsnAnnotationvisitLineNumbervisitLocalVariablevisitLocalVariableAnnotationvisitMaxsvisitParametervisitParameterAnnotationvisitTryCatchAnnotationvisitTryCatchBlockvisitTypeAnnotation

Field Detail

triggerback to summary
private boolean trigger

true if the exception table callback was already triggered.

Constructor Detail

ExceptionTableSensitiveMethodVisitorback to summary
protected ExceptionTableSensitiveMethodVisitor(int api, MethodVisitor methodVisitor)

Creates an exception table sensitive method visitor.

Parameters
api:int

The ASM API version.

methodVisitor:MethodVisitor

The delegating method visitor.

Method Detail

considerEndOfExceptionTableback to summary
private void considerEndOfExceptionTable()

Considers if the end of the exception table was reached.

onAfterExceptionTableback to summary
protected abstract void onAfterExceptionTable()

Invoked after the exception table was visited. Typically, the exception table is visited by ASM at the beginning of a method. It is however possible that a user adds exception table entries at a later point. Normally, this is however not meaningful use of ASM.

onVisitFieldInsnback to summary
protected void onVisitFieldInsn(int opcode, String owner, String name, String descriptor)

Visits a field instruction.

Parameters
opcode:int

The visited opcode.

owner:String

The field's owner.

name:String

The field's name.

descriptor:String

The field's descriptor.

onVisitFrameback to summary
protected void onVisitFrame(int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)

Visits a stack map frame.

Parameters
type:int

The type of stack map frame.

localVariableLength:int

The length of the local variable array.

localVariable:Object[]

An array containing type symbols for all values in the local variable array.

stackSize:int

The size of the operand stack.

stack:Object[]

An array containing type symbols for all values on the operand stack.

onVisitIincInsnback to summary
protected void onVisitIincInsn(int offset, int increment)

Visits an increment instruction.

Parameters
offset:int

The offset of the accessed variable.

increment:int

The value with which to increment.

onVisitInsnback to summary
protected void onVisitInsn(int opcode)

Visits a simple instruction.

Parameters
opcode:int

The opcode of the instruction.

onVisitIntInsnback to summary
protected void onVisitIntInsn(int opcode, int operand)

Visits an integer opcode.

Parameters
opcode:int

The visited opcode.

operand:int

The visited operand.

onVisitInvokeDynamicInsnback to summary
protected void onVisitInvokeDynamicInsn(String name, String descriptor, Handle handle, Object... argument)

Visits an invoke dynamic instruction.

Parameters
name:String

The name of the method.

descriptor:String

The descriptor of the method.

handle:Handle

The bootstrap method handle.

argument:Object[]

The bootstrap method arguments.

onVisitJumpInsnback to summary
protected void onVisitJumpInsn(int opcode, Label label)

Visits a jump instruction.

Parameters
opcode:int

The visited opcode.

label:Label

The visited label.

onVisitLabelback to summary
protected void onVisitLabel(Label label)

Visits a label.

Parameters
label:Label

The visited label.

See Also
MethodVisitor#visitLabel(Label)
onVisitLdcInsnback to summary
protected void onVisitLdcInsn(Object constant)

Visits a constant pool access instruction.

Parameters
constant:Object

The constant pool value.

onVisitLookupSwitchInsnback to summary
protected void onVisitLookupSwitchInsn(Label defaultTarget, int[] key, Label[] label)

Visits a lookup switch instruction.

Parameters
defaultTarget:Label

The default option.

key:int[]

The key values.

label:Label[]

The targets for each key.

onVisitMethodInsnback to summary
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor)

Visits a method instruction.

Parameters
opcode:int

The visited opcode.

owner:String

The method's owner.

name:String

The method's internal name.

descriptor:String

The method's descriptor.

Annotations
@Deprecated
@SuppressWarnings:deprecation
onVisitMethodInsnback to summary
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface)

Visits a method instruction.

Parameters
opcode:int

The visited opcode.

owner:String

The method's owner.

name:String

The method's internal name.

descriptor:String

The method's descriptor.

isInterface:boolean

true if the method belongs to an interface.

onVisitMultiANewArrayInsnback to summary
protected void onVisitMultiANewArrayInsn(String descriptor, int dimensions)

Visits an instruction for creating a multidimensional array.

Parameters
descriptor:String

The type descriptor of the array's component type.

dimensions:int

The dimensions of the array.

onVisitTableSwitchInsnback to summary
protected void onVisitTableSwitchInsn(int minimum, int maximum, Label defaultTarget, Label... label)

Visits a table switch instruction.

Parameters
minimum:int

The minimum index.

maximum:int

The maximum index.

defaultTarget:Label

A label indicating the default value.

label:Label[]

Labels indicating the jump targets.

onVisitTypeInsnback to summary
protected void onVisitTypeInsn(int opcode, String type)

Visits a type instruction.

Parameters
opcode:int

The visited opcode.

type:String

The type name.

onVisitVarInsnback to summary
protected void onVisitVarInsn(int opcode, int offset)

Visits an variable instruction.

Parameters
opcode:int

The visited opcode.

offset:int

The visited offset.

visitFieldInsnback to summary
public final void visitFieldInsn(int opcode, String owner, String name, String descriptor)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitFieldInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitFieldInsn.

Visits a field instruction. A field instruction is an instruction that loads or stores the value of a field of an object.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.

owner:String

the internal name of the field's owner class (see Type#getInternalName()).

name:String

the field's name.

descriptor:String

the field's descriptor (see Type).

Annotations
@Override
visitFrameback to summary
public final void visitFrame(int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitFrame.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitFrame.

Visits the current state of the local variables and operand stack elements. This method must(*) be called just before any instruction i that follows an unconditional branch instruction such as GOTO or THROW, that is the target of a jump instruction, or that starts an exception handler block. The visited types must describe the values of the local variables and of the operand stack elements just before i is executed.

(*) this is mandatory only for classes whose version is greater than or equal to Opcodes#V1_6.

The frames of a method must be given either in expanded form, or in compressed form (all frames must use the same format, i.e. you must not mix expanded and compressed frames within a single method):

  • In expanded form, all frames must have the F_NEW type.
  • In compressed form, frames are basically "deltas" from the state of the previous frame:
    • Opcodes#F_SAME representing frame with exactly the same locals as the previous frame and with the empty stack.
    • Opcodes#F_SAME1 representing frame with exactly the same locals as the previous frame and with single value on the stack ( numStack is 1 and stack[0] contains value for the type of the stack item).
    • Opcodes#F_APPEND representing frame with current locals are the same as the locals in the previous frame, except that additional locals are defined ( numLocal is 1, 2 or 3 and local elements contains values representing added types).
    • Opcodes#F_CHOP representing frame with current locals are the same as the locals in the previous frame, except that the last 1-3 locals are absent and with the empty stack (numLocal is 1, 2 or 3).
    • Opcodes#F_FULL representing complete frame data.

In both cases the first frame, corresponding to the method's parameters and access flags, is implicit and must not be visited. Also, it is illegal to visit two or more frames for the same code location (i.e., at least one instruction must be visited between two calls to visitFrame).
Parameters
type:int

the type of this stack map frame. Must be Opcodes#F_NEW for expanded frames, or Opcodes#F_FULL, Opcodes#F_APPEND, Opcodes#F_CHOP, Opcodes#F_SAME or Opcodes#F_APPEND, Opcodes#F_SAME1 for compressed frames.

localVariableLength:int

the number of local variables in the visited frame. Long and double values count for one variable.

localVariable:Object[]

the local variable types in this frame. This array must not be modified. Primitive types are represented by Opcodes#TOP, Opcodes#INTEGER, Opcodes#FLOAT, Opcodes#LONG, Opcodes#DOUBLE, Opcodes#NULL or Opcodes#UNINITIALIZED_THIS (long and double are represented by a single element). Reference types are represented by String objects (representing internal names, see Type#getInternalName()), and uninitialized types by Label objects (this label designates the NEW instruction that created this uninitialized value).

stackSize:int

the number of operand stack elements in the visited frame. Long and double values count for one stack element.

stack:Object[]

the operand stack types in this frame. This array must not be modified. Its content has the same format as the "local" array.

Annotations
@Override
visitIincInsnback to summary
public final void visitIincInsn(int offset, int increment)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitIincInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitIincInsn.

Visits an IINC instruction.

Parameters
offset:int

index of the local variable to be incremented.

increment:int

amount to increment the local variable by.

Annotations
@Override
visitInsnback to summary
public final void visitInsn(int opcode)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitInsn.

Visits a zero operand instruction.

Parameters
opcode:int

the opcode of the instruction to be visited. This opcode is either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT.

Annotations
@Override
visitIntInsnback to summary
public final void visitIntInsn(int opcode, int operand)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitIntInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitIntInsn.

Visits an instruction with a single int operand.

Parameters
opcode:int

the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.

operand:int

the operand of the instruction to be visited.
When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
When opcode is NEWARRAY, operand value should be one of Opcodes#T_BOOLEAN, Opcodes#T_CHAR, Opcodes#T_FLOAT, Opcodes#T_DOUBLE, Opcodes#T_BYTE, Opcodes#T_SHORT, Opcodes#T_INT or Opcodes#T_LONG.

Annotations
@Override
visitInvokeDynamicInsnback to summary
public final void visitInvokeDynamicInsn(String name, String descriptor, Handle handle, Object... argument)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitInvokeDynamicInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitInvokeDynamicInsn.

Visits an invokedynamic instruction.

Parameters
name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

handle:Handle

the bootstrap method.

argument:Object[]

the bootstrap method constant arguments. Each argument must be an Integer, Float, Long, Double, String, Type, Handle or ConstantDynamic value. This method is allowed to modify the content of the array so a caller should expect that this array may change.

Annotations
@Override
visitJumpInsnback to summary
public final void visitJumpInsn(int opcode, Label label)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitJumpInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitJumpInsn.

Visits a jump instruction. A jump instruction is an instruction that may jump to another instruction.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.

label:Label

the operand of the instruction to be visited. This operand is a label that designates the instruction to which the jump instruction may jump.

Annotations
@Override
visitLabelback to summary
public final void visitLabel(Label label)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLabel.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitLabel.

Visits a label. A label designates the instruction that will be visited just after it.

Parameters
label:Label

a Label object.

Annotations
@Override
visitLdcInsnback to summary
public final void visitLdcInsn(Object constant)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLdcInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitLdcInsn.

Visits a LDC instruction. Note that new constant types may be added in future versions of the Java Virtual Machine. To easily detect new constant types, implementations of this method should check for unexpected constant types, like this:

if (cst instanceof Integer) {
    // ...
} else if (cst instanceof Float) {
    // ...
} else if (cst instanceof Long) {
    // ...
} else if (cst instanceof Double) {
    // ...
} else if (cst instanceof String) {
    // ...
} else if (cst instanceof Type) {
    int sort = ((Type) cst).getSort();
    if (sort == Type.OBJECT) {
        // ...
    } else if (sort == Type.ARRAY) {
        // ...
    } else if (sort == Type.METHOD) {
        // ...
    } else {
        // throw an exception
    }
} else if (cst instanceof Handle) {
    // ...
} else if (cst instanceof ConstantDynamic) {
    // ...
} else {
    // throw an exception
}
Parameters
constant:Object

the constant to be loaded on the stack. This parameter must be a non null Integer, a Float, a Long, a Double, a String, a Type of OBJECT or ARRAY sort for .class constants, for classes whose version is 49, a Type of METHOD sort for MethodType, a Handle for MethodHandle constants, for classes whose version is 51 or a ConstantDynamic for a constant dynamic for classes whose version is 55.

Annotations
@Override
visitLookupSwitchInsnback to summary
public final void visitLookupSwitchInsn(Label dflt, int[] key, Label[] label)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitLookupSwitchInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitLookupSwitchInsn.

Visits a LOOKUPSWITCH instruction.

Parameters
dflt:Label

beginning of the default handler block.

key:int[]

the values of the keys.

label:Label[]

beginnings of the handler blocks. labels[i] is the beginning of the handler block for the keys[i] key.

Annotations
@Override
visitMethodInsnback to summary
public final void visitMethodInsn(int opcode, String owner, String name, String descriptor)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction. A method instruction is an instruction that invokes a method.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.

owner:String

the internal name of the method's owner class (see Type#getInternalName()).

name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

Annotations
@Override
@SuppressWarnings:deprecation
visitMethodInsnback to summary
public final void visitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction. A method instruction is an instruction that invokes a method.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.

owner:String

the internal name of the method's owner class (see Type#getInternalName()).

name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

isInterface:boolean

if the method's owner class is an interface.

Annotations
@Override
visitMultiANewArrayInsnback to summary
public final void visitMultiANewArrayInsn(String descriptor, int dimensions)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitMultiANewArrayInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitMultiANewArrayInsn.

Visits a MULTIANEWARRAY instruction.

Parameters
descriptor:String

an array type descriptor (see Type).

dimensions:int

the number of dimensions of the array to allocate.

Annotations
@Override
visitTableSwitchInsnback to summary
public final void visitTableSwitchInsn(int minimum, int maximum, Label defaultTarget, Label... label)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitTableSwitchInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitTableSwitchInsn.

Visits a TABLESWITCH instruction.

Parameters
minimum:int

the minimum key value.

maximum:int

the maximum key value.

defaultTarget:Label

beginning of the default handler block.

label:Label[]

beginnings of the handler blocks. labels[i] is the beginning of the handler block for the min + i key.

Annotations
@Override
visitTypeInsnback to summary
public final void visitTypeInsn(int opcode, String type)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitTypeInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitTypeInsn.

Visits a type instruction. A type instruction is an instruction that takes the internal name of a class as parameter (see Type#getInternalName()).

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.

type:String

the operand of the instruction to be visited. This operand must be the internal name of an object or array class (see Type#getInternalName()).

Annotations
@Override
visitVarInsnback to summary
public final void visitVarInsn(int opcode, int offset)

Overrides net.bytebuddy.jar.asm.MethodVisitor.visitVarInsn.

Doc from net.bytebuddy.jar.asm.MethodVisitor.visitVarInsn.

Visits a local variable instruction. A local variable instruction is an instruction that loads or stores the value of a local variable.

Parameters
opcode:int

the opcode of the local variable instruction to be visited. This opcode is either ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.

offset:int

the operand of the instruction to be visited. This operand is the index of a local variable.

Annotations
@Override