public static Cons javaTranslateDefineGlobalVariableUnit(TranslationUnit unit) {
    { GlobalVariable global = ((GlobalVariable)(unit.theObject));

      { Object old$Context$000 = Stella.$CONTEXT$.get();
        Object old$Module$000 = Stella.$MODULE$.get();

        try {
          Native.setSpecial(Stella.$CONTEXT$, global.homeModule());
          Native.setSpecial(Stella.$MODULE$, ((Context)(Stella.$CONTEXT$.get())).baseModule);
          { StringWrapper variabletype = (global.variableSpecialP ? StringWrapper.wrapString(Stella.javaYieldSpecialVariableClassName()) : StandardObject.javaTranslateTypeSpec(GlobalVariable.globalVariableTypeSpec(global)));
            Cons typelist = Cons.cons(variabletype, Stella.NIL);
            Stella_Object initialvaluetree = Stella_Object.javaTranslateATree(unit.codeRegister);
            StringWrapper variablename = Symbol.javaTranslateGlobalName(global.variableName, true);

            typelist = Cons.cons(StringWrapper.wrapString("static"), typelist);
            if (global.variableConstantP ||
                global.variableSpecialP) {
              typelist = Cons.cons(StringWrapper.wrapString("final"), typelist);
            }
            if (global.variablePublicP) {
              typelist = Cons.cons(StringWrapper.wrapString("public"), typelist);
            }
            if ((unit.codeRegister == Stella.KWD_UNBOUND_SPECIAL_VARIABLE) ||
                global.variableSpecialP) {
              return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_GLOBAL, Cons.cons(StringWrapper.wrapString(global.documentation), Cons.cons(Cons.list$(Cons.cons(Cons.cons(Stella.SYM_STELLA_JAVA_TYPE, typelist.concatenate(Stella.NIL, Stella.NIL)), Cons.cons(variablename, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_MAKE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_IDENT, Cons.cons(variabletype, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Cons.cons(Stella.SYM_STELLA_JAVA_ACTUALS, Stella.NIL), Cons.cons(Stella.NIL, Stella.NIL))))), Stella.NIL), Stella.NIL)))), Stella.NIL)))));
            }
            else {
              return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_GLOBAL, Cons.cons(StringWrapper.wrapString(global.documentation), Cons.cons(Cons.list$(Cons.cons(Cons.cons(Stella.SYM_STELLA_JAVA_TYPE, typelist.concatenate(Stella.NIL, Stella.NIL)), Cons.cons(variablename, Cons.cons(Cons.cons(initialvaluetree, Stella.NIL), Stella.NIL)))), Stella.NIL)))));
            }
          }

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