org.objectweb.asm.util
public class CheckCodeAdapter extends CodeAdapter
CodeAdapter that checks that its methods are properly
used. More precisely this code adapter checks each instruction individually
(i.e., each visit method checks some preconditions based only on its
arguments - such as the fact that the given opcode is correct for a given
visit method), but does not check the sequence of instructions.
For example, in a method whose signature is void m (), the invalid
instruction IRETURN, or the invalid sequence IADD L2I will not be
detected by this code adapter.
| Constructor Summary | |
|---|---|
| CheckCodeAdapter(CodeVisitor cv)
Constructs a new CheckCodeAdapter object.
| |
| Method Summary | |
|---|---|
| void | visitAttribute(Attribute attr) |
| 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 | visitJumpInsn(int opcode, Label label) |
| void | visitLabel(Label label) |
| void | visitLdcInsn(Object cst) |
| void | visitLineNumber(int line, Label start) |
| void | visitLocalVariable(String name, String desc, Label start, Label end, int index) |
| void | visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) |
| void | visitMaxs(int maxStack, int maxLocals) |
| void | visitMethodInsn(int opcode, String owner, String name, String desc) |
| void | visitMultiANewArrayInsn(String desc, int dims) |
| void | visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) |
| void | visitTryCatchBlock(Label start, Label end, Label handler, String type) |
| void | visitTypeInsn(int opcode, String desc) |
| void | visitVarInsn(int opcode, int var) |
CheckCodeAdapter object.
Parameters: cv the code visitor to which this adapter must delegate calls.