public static void javaOutputClassToFile(Stella_Class renamed_Class) {
    { Object old$CurrentJavaOutputClass$000 = Stella.$CURRENT_JAVA_OUTPUT_CLASS$.get();

      try {
        Native.setSpecial(Stella.$CURRENT_JAVA_OUTPUT_CLASS$, renamed_Class);
        { Object old$Context$000 = Stella.$CONTEXT$.get();
          Object old$Module$000 = Stella.$MODULE$.get();

          try {
            Native.setSpecial(Stella.$CONTEXT$, renamed_Class.homeModule());
            Native.setSpecial(Stella.$MODULE$, ((Context)(Stella.$CONTEXT$.get())).baseModule);
            { String classoutputfile = renamed_Class.javaMakeCodeOutputFileName(false);
              Cons translation = Stella.NIL;

              { OutputFileStream classoutputstream = null;

                try {
                  classoutputstream = Stella.openOutputFile(classoutputfile, Stella.NIL);
                  { Object old$CurrentStream$000 = Stella.$CURRENT_STREAM$.get();

                    try {
                      Native.setSpecial(Stella.$CURRENT_STREAM$, classoutputstream);
                      System.out.println("Translating `" + renamed_Class + "'...");
                      translation = Stella_Class.javaTranslateDefineNativeClass(renamed_Class);
                      if (((Integer)(Stella.$TRANSLATIONVERBOSITYLEVEL$.get())).intValue() >= 1) {
                        System.out.println("    Writing `" + classoutputfile + "'...");
                      }
                      OutputStream.javaOutputFileHeader(classoutputstream, renamed_Class.javaMakeCodeOutputFileName(true));
                      Cons.javaOutputClass(translation.rest, Stella_Class.exceptionClassP(renamed_Class));

                    } finally {
                      Stella.$CURRENT_STREAM$.set(old$CurrentStream$000);
                    }
                  }

                } finally {
                  if (classoutputstream != null) {
                    classoutputstream.free();
                  }
                }
              }
            }

          } finally {
            Stella.$MODULE$.set(old$Module$000);
            Stella.$CONTEXT$.set(old$Context$000);
          }
        }

      } finally {
        Stella.$CURRENT_JAVA_OUTPUT_CLASS$.set(old$CurrentJavaOutputClass$000);
      }
    }
  }