public static void outputAllUnitsToFile(String sourcefile) {
    if (((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) == Stella.KWD_COMMON_LISP) {
      Stella.clOutputAllUnitsToFile(sourcefile);
    }
    else if (((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) == Stella.KWD_JAVA) {
      { Object old$JavaIndentChars$000 = Stella.$JAVA_INDENT_CHARS$.get();

        try {
          Native.setIntSpecial(Stella.$JAVA_INDENT_CHARS$, 0);
          Stella.javaOutputAllUnitsToFile();

        } finally {
          Stella.$JAVA_INDENT_CHARS$.set(old$JavaIndentChars$000);
        }
      }
    }
    else if (((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) == Stella.KWD_IDL) {
      { Object old$IdlIndentChars$000 = Stella.$IDL_INDENT_CHARS$.get();

        try {
          Native.setIntSpecial(Stella.$IDL_INDENT_CHARS$, 0);
          Stella.idlOutputAllUnitsToFile(sourcefile);

        } finally {
          Stella.$IDL_INDENT_CHARS$.set(old$IdlIndentChars$000);
        }
      }
    }
    else if ((((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) == Stella.KWD_CPP) ||
        (((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) == Stella.KWD_CPP_STANDALONE)) {
      { Object old$CppIndentChars$000 = Stella.$CPP_INDENT_CHARS$.get();

        try {
          Native.setIntSpecial(Stella.$CPP_INDENT_CHARS$, 0);
          Stella.cppOutputAllUnitsToFile(sourcefile);

        } finally {
          Stella.$CPP_INDENT_CHARS$.set(old$CppIndentChars$000);
        }
      }
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + ((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())) + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
  }