docs: CapabilityRegistry createShadowCopy() {
          CapabilityRegistry result = new CapabilityRegistry(forServer, this);
          readLock.lock();
          try {
              try {
                  result.writeLock.lock();
                  copy(this, result);
              } finally {
                  result.writeLock.unlock();
              }
          } finally {
              readLock.unlock();
          }
          return result;
      }