Class InvocationBlockModifier
java.lang.Object
mockit.asm.BaseWriter
mockit.asm.methods.MethodVisitor
mockit.asm.methods.WrappingMethodVisitor
mockit.internal.expectations.transformation.InvocationBlockModifier
-
Field Summary
Fields inherited from class mockit.asm.methods.WrappingMethodVisitor
mw
Fields inherited from class mockit.asm.BaseWriter
annotations, classOrMemberAccess, cp
-
Method Summary
Modifier and TypeMethodDescriptionvoid
visitFieldInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, String owner, String name, String desc) Visits a field access instruction, which loads or stores the value of a field of an object or a class.void
visitInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode) Visits a zero operand instruction.void
visitIntInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, int operand) Visits an instruction with a singleint
operand.void
visitJumpInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, Label label) Visits a jump instruction.void
visitLabel
(Label label) Visits a label, which designates the instruction that will be visited just after it.void
visitLdcInsn
(Object cst) Visits aLDC
instruction.void
visitLocalVariable
(String name, String desc, String signature, Label start, Label end, @org.checkerframework.checker.index.qual.NonNegative int index) Visits a local variable declaration.void
visitLookupSwitchInsn
(Label dflt, int[] keys, Label[] labels) Visits aLOOKUPSWITCH
instruction.void
visitMethodInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, String owner, String name, String desc, boolean itf) Visits a method invocation instruction, which invokes a method or constructor.void
visitMultiANewArrayInsn
(String desc, @org.checkerframework.checker.index.qual.NonNegative int dims) Visits aMULTIANEWARRAY
instruction.void
visitTableSwitchInsn
(int min, int max, Label dflt, Label... labels) Visits aTABLESWITCH
instruction.void
visitTypeInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, String typeDesc) Visits a type instruction, which takes the internal name of a class as parameter.void
visitVarInsn
(@org.checkerframework.checker.index.qual.NonNegative int opcode, @org.checkerframework.checker.index.qual.NonNegative int varIndex) Visits a local variable instruction, which loads or stores the value of a local variable.Methods inherited from class mockit.asm.methods.WrappingMethodVisitor
visitAnnotation, visitIincInsn, visitInvokeDynamicInsn, visitLineNumber, visitMaxStack, visitParameterAnnotation, visitTryCatchBlock
Methods inherited from class mockit.asm.BaseWriter
createMarkerAttributes, getAnnotationsSize, getConstantPoolGeneration, getMarkerAttributeCount, getMarkerAttributesSize, put, put, putAccess, putAnnotations, putMarkerAttributes, visitEnd
-
Method Details
-
visitFieldInsn
public void visitFieldInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, @NonNull String owner, @NonNull String name, @NonNull String desc) Description copied from class:MethodVisitor
Visits a field access instruction, which loads or stores the value of a field of an object or a class.- Overrides:
visitFieldInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the instruction to be visited: GETSTATIC, PUTSTATIC, GETFIELD, or PUTFIELDowner
- the internal name of the field's owner classname
- the field's namedesc
- the field's descriptor (seeJavaType
)
-
visitMethodInsn
public void visitMethodInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, @NonNull String owner, @NonNull String name, @NonNull String desc, boolean itf) Description copied from class:MethodVisitor
Visits a method invocation instruction, which invokes a method or constructor.- Overrides:
visitMethodInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the instruction: INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC, or INVOKEINTERFACEowner
- the internal name of the method's owner classname
- the method's namedesc
- the method's descriptor (seeJavaType
)itf
- whether the method's owner class is an interface or not
-
visitLabel
Description copied from class:MethodVisitor
Visits a label, which designates the instruction that will be visited just after it.- Overrides:
visitLabel
in classWrappingMethodVisitor
-
visitTypeInsn
public void visitTypeInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, @NonNull String typeDesc) Description copied from class:MethodVisitor
Visits a type instruction, which takes the internal name of a class as parameter.- Overrides:
visitTypeInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the instruction to be visited: NEW, ANEWARRAY, CHECKCAST, or INSTANCEOFtypeDesc
- the operand of the instruction, which is the internal name of an object or array class
-
visitIntInsn
public void visitIntInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, int operand) Description copied from class:MethodVisitor
Visits an instruction with a singleint
operand.- Overrides:
visitIntInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the instruction to be visited: BIPUSH, SIPUSH, or NEWARRAYoperand
- the operand of the instruction to be visited: when opcode is BIPUSH, it's betweenByte.MIN_VALUE
andByte.MAX_VALUE
; when opcode is SIPUSH, it's betweenShort.MIN_VALUE
andShort.MAX_VALUE
; when opcode is NEWARRAY, the operand value is one of theArrayElementType
values
-
visitVarInsn
public void visitVarInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, @org.checkerframework.checker.index.qual.NonNegative int varIndex) Description copied from class:MethodVisitor
Visits a local variable instruction, which loads or stores the value of a local variable.- Overrides:
visitVarInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the local variable instruction to be visited: ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RETvarIndex
- the operand of the instruction to be visited, which is the index of a local variable
-
visitLdcInsn
Description copied from class:MethodVisitor
Visits aLDC
instruction.- Overrides:
visitLdcInsn
in classWrappingMethodVisitor
- Parameters:
cst
- the constant to be loaded on the stack, which must be a non nullInteger
/Float
/Long
/Double
/String
, anObjectType
orArrayType
for.class
constants, aMethodType
, or aMethodHandle
-
visitJumpInsn
public void visitJumpInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode, @NonNull Label label) Description copied from class:MethodVisitor
Visits a jump instruction.- Overrides:
visitJumpInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the jump instruction to be visited: 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 IFNONNULLlabel
- the operand of the instruction to be visited, which is a label that designates the instruction to which the jump instruction may jump
-
visitTableSwitchInsn
Description copied from class:MethodVisitor
Visits aTABLESWITCH
instruction.- Overrides:
visitTableSwitchInsn
in classWrappingMethodVisitor
- Parameters:
min
- the minimum key valuemax
- the maximum key valuedflt
- beginning of the default handler blocklabels
- beginnings of the handler blocks;labels[i]
is the beginning of the handler block for themin + i
key
-
visitLookupSwitchInsn
public void visitLookupSwitchInsn(@NonNull Label dflt, @NonNull int[] keys, @NonNull Label[] labels) Description copied from class:MethodVisitor
Visits aLOOKUPSWITCH
instruction.- Overrides:
visitLookupSwitchInsn
in classWrappingMethodVisitor
- Parameters:
dflt
- beginning of the default handler blockkeys
- the values of the keyslabels
- beginnings of the handler blocks;labels[i]
is the beginning of the handler block for thekeys[i]
-
visitMultiANewArrayInsn
public void visitMultiANewArrayInsn(@NonNull String desc, @org.checkerframework.checker.index.qual.NonNegative int dims) Description copied from class:MethodVisitor
Visits aMULTIANEWARRAY
instruction.- Overrides:
visitMultiANewArrayInsn
in classWrappingMethodVisitor
- Parameters:
desc
- an array type descriptor (seeArrayType
)dims
- number of dimensions of the array to allocate
-
visitInsn
public void visitInsn(@org.checkerframework.checker.index.qual.NonNegative int opcode) Description copied from class:MethodVisitor
Visits a zero operand instruction.- Overrides:
visitInsn
in classWrappingMethodVisitor
- Parameters:
opcode
- the opcode of the instruction to be visited: NOP, ACONST_NULL, ICONST_M1, ICONST_0 ICONST_0 to ICONST_5, LCONST_0, LCONST_1, FCONST_0 to 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
-
visitLocalVariable
public void visitLocalVariable(@NonNull String name, @NonNull String desc, @Nullable String signature, @NonNull Label start, @NonNull Label end, @org.checkerframework.checker.index.qual.NonNegative int index) Description copied from class:MethodVisitor
Visits a local variable declaration.- Overrides:
visitLocalVariable
in classWrappingMethodVisitor
- Parameters:
name
- the name of the local variabledesc
- the type descriptor of the local variablesignature
- the type signature of the local variable;null
when the local variable type does not use generic typesstart
- the first instruction corresponding to the scope of this local variable (inclusive)end
- the last instruction corresponding to the scope of this local variable (exclusive)index
- the local variable's index
-