* @return Iterator
   */
  public static Iterator directSuperrelations(Relation self) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfClassP(testValue000)) {
        { Stella_Class self000 = ((Stella_Class)(self));

          return (self000.directSuperClasses());
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_SLOT)) {
        { Slot self000 = ((Slot)(self));

          return (((ListIterator)(self000.slotDirectSupers().allocateIterator())));
        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }