code: static @Nonnull List<ThreadLock.Monitor> getMonitors(final ThreadInfo threadInfo) {
          final MonitorInfo[] monitors = threadInfo.getLockedMonitors();
  
          final List<ThreadLock.Monitor> locks = new ArrayList<ThreadLock.Monitor>(monitors.length);
  
          for (MonitorInfo info: monitors) {
              locks.add(getMonitor(info));
          }
  
          return locks;
      }
docs: /*package