public static void translateFile(String file, Keyword outputlanguage, boolean aspartofsystemP) {
    { Keyword mode = Stella.KWD_TRANSLATE;

      { Object old$JavaIndentChars$000 = Stella.$JAVA_INDENT_CHARS$.get();
        Object old$IdlIndentChars$000 = Stella.$IDL_INDENT_CHARS$.get();
        Object old$CppIndentChars$000 = Stella.$CPP_INDENT_CHARS$.get();

        try {
          Native.setIntSpecial(Stella.$JAVA_INDENT_CHARS$, 0);
          Native.setIntSpecial(Stella.$IDL_INDENT_CHARS$, 0);
          Native.setIntSpecial(Stella.$CPP_INDENT_CHARS$, 0);
          if (outputlanguage == Stella.KWD_JAVA) {
            if (aspartofsystemP) {
              mode = Stella.KWD_WALK;
            }
          }
          else {
          }
          if (aspartofsystemP) {
            Stella.operateOnFile(file, mode);
          }
          else {
            { Object old$Translatoroutputlanguage$000 = Stella.$TRANSLATOROUTPUTLANGUAGE$.get();
              Object old$Translationunits$000 = Stella.$TRANSLATIONUNITS$.get();

              try {
                Native.setSpecial(Stella.$TRANSLATOROUTPUTLANGUAGE$, ((Keyword)(Stella.$TRANSLATOROUTPUTLANGUAGE$.get())));
                Native.setSpecial(Stella.$TRANSLATIONUNITS$, List.newList());
                Keyword.setTranslatorOutputLanguage(outputlanguage);
                Stella.operateOnFile(file, mode);
                if (outputlanguage == Stella.KWD_CPP_STANDALONE) {
                }
                else {
                  Stella.cleanUpTranslationUnitsSpecial();
                }

              } finally {
                Stella.$TRANSLATIONUNITS$.set(old$Translationunits$000);
                Stella.$TRANSLATOROUTPUTLANGUAGE$.set(old$Translatoroutputlanguage$000);
              }
            }
          }

        } finally {
          Stella.$CPP_INDENT_CHARS$.set(old$CppIndentChars$000);
          Stella.$IDL_INDENT_CHARS$.set(old$IdlIndentChars$000);
          Stella.$JAVA_INDENT_CHARS$.set(old$JavaIndentChars$000);
        }
      }
    }
  }