private void noticeRedefineClass(ReferenceType type) {
    if (!(type instanceof ReferenceTypeImpl) && !ourNoticeRedefineClassMethod.getDeclaringClass().isAssignableFrom(type.getClass())) {
      return;
    }
    List<Requestor> requestors = StreamEx.of(type.virtualMachine().eventRequestManager().breakpointRequests())
      .filter(r -> type.equals(r.location().declaringType()))
      .map(RequestManagerImpl::findRequestor)
      .toList();
    requestors.forEach(myDebugProcess.getRequestsManager()::deleteRequest);

    if (type instanceof ReferenceTypeImpl) {
      ((ReferenceTypeImpl)type).noticeRedefineClass();
    }
    else {
      try {
        ourNoticeRedefineClassMethod.invoke(type);
      }
      catch (IllegalAccessException | InvocationTargetException e) {
        LOG.error(e);
      }
    }

    StreamEx.of(requestors).select(Breakpoint.class).forEach(b -> b.createRequest(myDebugProcess));
  }
private void noticeRedefineClass(ReferenceType type)