public static Cons javaTranslateObjectToReturnType(Cons tree, StandardObject returntype) {
    if (StandardObject.javaLiteralP(returntype)) {
      return (Cons.javaWrapWithNativeValueExtraction(tree, returntype));
    }
    else if ((returntype == Stella.SGT_STELLA_STRING) ||
        (returntype == Stella.SGT_STELLA_MUTABLE_STRING)) {
      return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_CAST, Cons.cons(tree, Cons.cons(Cons.cons(StandardObject.javaTranslateTypeSpec(returntype), Stella.NIL), Stella.NIL)))));
    }
    else if (returntype == Stella.SGT_STELLA_VOID) {
      return (tree);
    }
    else {
      return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_CAST, Cons.cons(tree, Cons.cons(Cons.cons(StandardObject.javaTranslateTypeSpec(returntype), Stella.NIL), Stella.NIL)))));
    }
  }