aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/host.jvm.lux')
-rw-r--r--stdlib/source/lux/host.jvm.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 62a3da2a6..ea4171184 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -1877,7 +1877,7 @@
(#;Left _)
(macro;fail (format "Unknown class: " class-name))))
-(syntax: #export (jvm-import [#let [imports (class-imports *compiler*)]]
+(syntax: #export (import [#let [imports (class-imports *compiler*)]]
[long-name? (s;this? (' #long))]
[class-decl (class-decl^ imports)]
[#let [full-class-name (product;left class-decl)
@@ -1888,7 +1888,7 @@
"Their methods, fields and enum options can also be imported."
"Also, classes which get imported into a module can also be referred-to with their short names in other macros that require JVM classes."
"Examples:"
- (jvm-import java.lang.Object
+ (import java.lang.Object
(new [])
(equals [Object] boolean)
(wait [int] #io #try void))
@@ -1897,24 +1897,24 @@
"#try means that the computation might throw an exception, and the return value will be wrapped by the Error type."
"#io means the computation has side effects, and will be wrapped by the IO type."
"These options must show up in the following order [#io #try #?] (although, each option can be used independently)."
- (jvm-import java.lang.String
+ (import java.lang.String
(new [(Array byte)])
(#static valueOf [char] String)
(#static valueOf #as int-valueOf [int] String))
- (jvm-import #long (java.util.List e)
+ (import #long (java.util.List e)
(size [] int)
(get [int] e))
- (jvm-import (java.util.ArrayList a)
+ (import (java.util.ArrayList a)
([T] toArray [(Array T)] (Array T)))
"#long makes it so the class-type that is generated is of the fully-qualified name."
"In this case, it avoids a clash between the java.util.List type, and Lux's own List type."
- (jvm-import java.lang.Character$UnicodeScript
+ (import java.lang.Character$UnicodeScript
(#enum ARABIC CYRILLIC LATIN))
"All enum options to be imported must be specified."
- (jvm-import #long (lux.concurrency.promise.JvmPromise A)
+ (import #long (lux.concurrency.promise.JvmPromise A)
(resolve [A] boolean)
(poll [] A)
(wasResolved [] boolean)