Пример #1
0
 @Override
 public void visitInsn(final int opcode) {
   if (opcode == Opcodes.DUP) {
     machine.gotDup();
     if (machine.skipInstruction()) return;
   }
   super.visitInsn(opcode);
 }
Пример #2
0
 @Override
 public void visitTypeInsn(final int opcode, final String desc) {
   System.out.println(desc);
   if (opcode == Opcodes.NEW) {
     machine.gotNew(desc);
     if (machine.skipInstruction()) return;
   }
   super.visitTypeInsn(opcode, desc);
 }
Пример #3
0
 @Override
 public void visitMethodInsn(
     final int opcode, final String owner, final String name, final String desc) {
   if (opcode == Opcodes.INVOKESPECIAL) {
     machine.gotInvokeSpecial(owner);
     if (machine.skipInstruction()) return;
   }
   super.visitMethodInsn(opcode, owner, name, desc);
 }
Пример #4
0
 @Override
 public void visitFieldInsn(
     final int opcode, final String owner, final String name, final String desc) {
   if (opcode == Opcodes.PUTSTATIC) {
     machine.gotPutStatic(owner);
     if (machine.skipInstruction()) return;
   }
   super.visitFieldInsn(opcode, owner, name, desc);
 }