BasicInterpreter that checks that bytecode instructions are correctly used.
| Access | Constructor and Description |
|---|---|
| public | |
| protected | BasicVerifier(final int
the ASM API version supported by this interpreter. Must be one of the api)ASMx values in Opcodes.Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public BasicValue | binaryOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final BasicValue the first argument of the instruction to be interpreted. value1, final BasicValue the second argument of the instruction to be interpreted. value2)Overrides org. |
| public BasicValue | copyOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final BasicValue the value that must be moved by the instruction. value)Overrides org. |
| protected BasicValue | Returns: the value corresponding to the type of the elements of 'objectArrayValue'.a value corresponding to array of object (or array) references. objectArrayValue)Returns the value corresponding to the type of the elements of the given array reference value. |
| protected boolean | Returns: whether 'value' corresponds to an array reference.a value. value)Returns whether the given value corresponds to an array reference. |
| protected boolean | Returns: whether the type corresponding to 'value' is a subtype of the type corresponding to 'expected'.a value. value, final BasicValue another value. expected)Returns whether the type corresponding to the first argument is a subtype of the type corresponding to the second argument. |
| public BasicValue | naryOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final List<? extends BasicValue> the arguments of the instruction to be interpreted. values)Overrides org. |
| public void | returnOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final BasicValue the argument of the instruction to be interpreted. value, final BasicValue the expected return type of the analyzed method. expected)Overrides org. |
| public BasicValue | ternaryOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final BasicValue the first argument of the instruction to be interpreted. value1, final BasicValue the second argument of the instruction to be interpreted. value2, final BasicValue the third argument of the instruction to be interpreted. value3)Overrides org. |
| public BasicValue | unaryOperation(final AbstractInsnNode
the bytecode instruction to be interpreted. insn, final BasicValue the argument of the instruction to be interpreted. value)Overrides org. |
| BasicVerifier | back to summary |
|---|---|
| public BasicVerifier() Constructs a new | |
| BasicVerifier | back to summary |
|---|---|
| protected BasicVerifier(final int api) Constructs a new
| |
| binaryOperation | back to summary |
|---|---|
| public BasicValue binaryOperation(final AbstractInsnNode insn, final BasicValue value1, final BasicValue value2) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode instruction with two arguments. This method is called for the following opcodes: IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, PUTFIELD
| |
| copyOperation | back to summary |
|---|---|
| public BasicValue copyOperation(final AbstractInsnNode insn, final BasicValue value) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode instruction that moves a value on the stack or to or from local variables. This method is called for the following opcodes: ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP
| |
| getElementValue | back to summary |
|---|---|
| protected BasicValue getElementValue(final BasicValue objectArrayValue) throws AnalyzerException Returns the value corresponding to the type of the elements of the given array reference value.
| |
| isArrayValue | back to summary |
|---|---|
| protected boolean isArrayValue(final BasicValue value) Returns whether the given value corresponds to an array reference.
| |
| isSubTypeOf | back to summary |
|---|---|
| protected boolean isSubTypeOf(final BasicValue value, final BasicValue expected) Returns whether the type corresponding to the first argument is a subtype of the type corresponding to the second argument.
| |
| naryOperation | back to summary |
|---|---|
| public BasicValue naryOperation(final AbstractInsnNode insn, final List<? extends BasicValue> values) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode instruction with a variable number of arguments. This method is called for the following opcodes: INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC, INVOKEINTERFACE, MULTIANEWARRAY and INVOKEDYNAMIC
| |
| returnOperation | back to summary |
|---|---|
| public void returnOperation(final AbstractInsnNode insn, final BasicValue value, final BasicValue expected) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode return instruction. This method is called for the following opcodes: IRETURN, LRETURN, FRETURN, DRETURN, ARETURN
| |
| ternaryOperation | back to summary |
|---|---|
| public BasicValue ternaryOperation(final AbstractInsnNode insn, final BasicValue value1, final BasicValue value2, final BasicValue value3) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode instruction with three arguments. This method is called for the following opcodes: IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE
| |
| unaryOperation | back to summary |
|---|---|
| public BasicValue unaryOperation(final AbstractInsnNode insn, final BasicValue value) throws AnalyzerException Overrides org. Doc from org. Interprets a bytecode instruction with a single argument. This method is called for the following opcodes: INEG, LNEG, FNEG, DNEG, IINC, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, TABLESWITCH, LOOKUPSWITCH, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, PUTSTATIC, GETFIELD, NEWARRAY, ANEWARRAY, ARRAYLENGTH, ATHROW, CHECKCAST, INSTANCEOF, MONITORENTER, MONITOREXIT, IFNULL, IFNONNULL
| |