@Override
      public boolean hasNext() {
        synchronized (lock) {
          if (subClassIterator.hasNext()) return true;
        }

        processMoreSubclasses(subClassIterator);

        synchronized (lock) {
          return subClassIterator.hasNext();
        }
      }
@Override
      public boolean hasNext()