Пример #1
0
 @Override
 public void visitInsn(int opcode) {
   if (opcode == Opcodes.MONITORENTER && (count == 0 || visitedCount < count)) {
     // a synchronized block occurs in the called method
     visitedCount++;
     if (count == 0 || visitedCount == count) {
       // and we have enough occurences to match the count
       setTriggerPoint();
     }
   }
   super.visitInsn(opcode);
 }
Пример #2
0
 public void visitEnd() {
   if (checkBindings()) {
     setVisitOk();
   }
   super.visitEnd();
 }