{"modulePath":"github.com/glojurelang/glojure","version":"v0.7.8","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pkgmap\n\n## Functions\n\n```go\nfunc Get(export string) (interface{}, bool)\n```\nGet returns the value of the given package and export name and whether it was found.\n\n```go\nfunc HostClass(class string) (reflect.Type, bool)\n```\nHostClass returns the reflect.Type registered for the given class and whether it was found.\n\n```go\nfunc HostClassPackage(class string) string\n```\nHostClassPackage returns the Java package registered for the given host class, or \"java.lang\" if none has been set.\n\n```go\nfunc HostClassPackages() map[string]string\n```\nHostClassPackages returns a copy of the registered (class, javaPkg) map. Used by the REPL to enumerate fully-qualified namespace prefixes such as \"java.time.\" or \"java.util.regex.\" in tab completion.\n\n```go\nfunc HostClassTypes() map[string]reflect.Type\n```\nHostClassTypes returns a copy of the registered (class, type) map. Used by lang.NewNamespace to seed each fresh namespace with the auto-imported host classes so (ns-imports \\*ns\\*) is non-empty.\n\n```go\nfunc HostClasses() []string\n```\nHostClasses returns the set of pseudo-class pkg names that have at least one entry, where a \"host class\" is identified by a pkg part that is a bare identifier (e.g. \"Math\", \"System\") rather than a Go import path. Import paths munge to colon-separated strings and usually contain a dot (e.g. \"github.com:...\"), so this excludes any pkg containing either a colon or a dot. Used by REPL tab completion to discover javacompat host-class symbols.\n\n```go\nfunc PkgEntries(pkg string) []string\n```\nPkgEntries returns the names registered under the given pkg. For example, PkgEntries(\"Math\") returns the JVM-style names exposed by the javacompat math bridge (\"abs\", \"sqrt\", \"PI\", ...). Returns nil if the pkg has no entries.\n\n```go\nfunc Set(export string, value interface{})\n```\nSet sets the value of the given package and export name.\n\n```go\nfunc SetHostClass(class string, t reflect.Type)\n```\nSetHostClass records the reflect.Type that represents a host class. Bridges call this once per class in init() so namespaces can seed their import maps with \\`\\\u003cshort-name\u003e -\u003e \\\u003ctype\u003e\\` entries, mirroring real Clojure's auto-import of java.lang.\\* (plus any other registered packages). The same value is also exported under the bare class name (e.g. \"Integer\") and, if the class's Java package has been registered via SetHostClassPackage, under the fully-qualified Java name (e.g. \"java.lang.Integer\"), so EvalASTMaybeClass can resolve both forms from any namespace whose mappings predate the bridge's init (notably clojure.core).\n\n```go\nfunc SetHostClassPackage(class, javaPkg string)\n```\nSetHostClassPackage records the Java package a host class lives in (e.g. \"java.lang\" for Math, \"java.time\" for Instant). Bridges call this once per class in init() so the REPL can offer the correct fully-qualified name during tab completion. If a class is not registered, callers should fall back to \"java.lang\".\n\n```go\nfunc SetLoader(loader func(func(string, interface{})))\n```\nSetLoader installs a generated import registrar. The full registry is populated on first lookup so programs that only use AOT-compiled namespaces do not build thousands of unused map entries during process startup.\n\n```go\nfunc SplitExport(export string) (string, string)\n```\n\n```go\nfunc UnmungePkg(pkg string) string\n```\n\n","path":"github.com/glojurelang/glojure/pkg/pkgmap","name":"pkgmap","synopsis":"","isRedistributable":true}
