public static boolean allClassesNextP(AllPurposeIterator self) {
    { int cursor = self.iteratorInteger;
      Surrogate surrogate = null;
      Stella_Object value = null;

      while (cursor < self.iteratorSecondInteger) {
        surrogate = ((Surrogate)((Stella.$SURROGATE_ARRAY$.theArray)[cursor]));
        if ((surrogate != null) &&
            AllPurposeIterator.selectedMetaObjectP(self, ((Module)(surrogate.homeContext)))) {
          value = surrogate.surrogateValue;
          if ((value != null) &&
              (Stella_Object.stellaClassP(value) &&
               (((Stella_Class)(value)).classType == surrogate))) {
            self.value = value;
            self.iteratorInteger = cursor + 1;
            return (true);
          }
        }
        cursor = cursor + 1;
      }
      return (false);
    }
  }