system

package
v0.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: EPL-1.0 Imports: 5 Imported by: 0

Documentation

Overview

Package system exposes JVM-faithful java.lang.System equivalents for code running on glojure. Each symbol is published two ways:

  • as a Go package-level value (used when gloat AOT-compiles a Clojure call site to a direct Go reference such as `compatsystem.Exit`); and
  • through glojure's pkgmap (used by the REPL and any dynamic resolution path).

Where the JVM signature returns a possibly-null String (System.getenv, System.getProperty), the bridge converts gojava's (string, bool) result into either the string value or nil so Clojure idioms like (when-let [v (System/getenv "HOME")] ...) work without extra glue.

Index

Constants

This section is empty.

Variables

View Source
var (
	Out = jsys.Out
	Err = jsys.Err
	In  = jsys.In
)

Stream values, exposed under System.out / System.err / System.in. They carry the Go methods (Println, Print, Printf, Write, Flush, Read) that glojure's FieldOrMethod resolves to from Clojure call sites like (.println System/out ...) (it capitalizes the first letter).

Functions

func ClearProperty

func ClearProperty(name any) any

ClearProperty returns the previous value (or nil if none).

func CurrentTimeMillis

func CurrentTimeMillis() int64

CurrentTimeMillis returns ms since epoch.

func Exit

func Exit(code any)

func Gc

func Gc()

func GetProperty

func GetProperty(args ...any) any

GetProperty dispatches on arity: one arg returns the value or nil; two args returns the value or the default.

func Getenv

func Getenv(args ...any) any

Getenv dispatches on arity: zero args returns a Clojure-visible map of all env vars; one arg returns the value as a string, or nil if unset.

func LineSeparator

func LineSeparator() string

func NanoTime

func NanoTime() int64

NanoTime returns a high-resolution time source.

func SetProperty

func SetProperty(name, value any) any

SetProperty returns the previous value (or nil if none).

Types

type System

type System struct{}

System is the placeholder type registered as java.lang.System's reflect.Type. System has private constructors in the JVM, so no instances exist; the value just makes (ns-imports *ns*) include the auto-imported class.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL