aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/ffi.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-03-14 17:03:38 -0400
committerEduardo Julian2022-03-14 17:03:38 -0400
commit62299ecdc93b39f6a22b1f89779f55dfa735fb3c (patch)
tree5456440c78bbdb1cd51e9156a7cd47ebf73b7edd /stdlib/source/documentation/lux/ffi.jvm.lux
parent792f88d0640831f426728b41d62d94fdcc4959d3 (diff)
Made JVM "import:" syntax consistent with the other "import:"s.
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/ffi.jvm.lux62
1 files changed, 31 insertions, 31 deletions
diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux
index b3c628ffe..5bf182890 100644
--- a/stdlib/source/documentation/lux/ffi.jvm.lux
+++ b/stdlib/source/documentation/lux/ffi.jvm.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux {"-" int char type :as}
- ["$" documentation {"+" documentation:}]
- [data
- ["[0]" text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" int char type :as}
+ ["$" documentation {"+" documentation:}]
+ [data
+ ["[0]" text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(template [<name>]
[(`` (documentation: <name>
@@ -179,44 +179,44 @@
"Allows importing JVM classes, and using them as types."
["Their methods, fields and enum options can also be imported."
(import: java/lang/Object
- ["[1]::[0]"
- (new [])
- (equals [java/lang/Object] boolean)
- (wait [int] "io" "try" void)])]
+ "[1]::[0]"
+ (new [])
+ (equals [java/lang/Object] boolean)
+ (wait [int] "io" "try" void))]
["Special options can also be given for the return values."
"'?' means that the values will be returned inside a Maybe type. That way, null becomes .#None."
"'try' means that the computation might throw an exception, and the return value will be wrapped by the Try 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)."
(import: java/lang/String
- ["[1]::[0]"
- (new [[byte]])
- ("static" valueOf [char] java/lang/String)
- ("static" valueOf "as" int_valueOf [int] java/lang/String)])
+ "[1]::[0]"
+ (new [[byte]])
+ ("static" valueOf [char] java/lang/String)
+ ("static" valueOf "as" int_valueOf [int] java/lang/String))
(import: (java/util/List e)
- ["[1]::[0]"
- (size [] int)
- (get [int] e)])
+ "[1]::[0]"
+ (size [] int)
+ (get [int] e))
(import: (java/util/ArrayList a)
- ["[1]::[0]"
- ([T] toArray [[T]] [T])])]
+ "[1]::[0]"
+ ([T] toArray [[T]] [T]))]
["The class-type that is generated is of the fully-qualified name."
"This avoids a clash between the java.util.List type, and Lux's own List type."
"All enum options to be imported must be specified."
(import: java/lang/Character$UnicodeScript
- ["[1]::[0]"
- ("enum" ARABIC CYRILLIC LATIN)])]
+ "[1]::[0]"
+ ("enum" ARABIC CYRILLIC LATIN))]
["It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-vars."
"Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)."
(import: (lux/concurrency/async/JvmAsync A)
- ["[1]::[0]"
- (resolve [A] boolean)
- (poll [] A)
- (wasResolved [] boolean)
- (waitOn [lux/Function] void)
- ("static" [A] make [A] (lux/concurrency/async/JvmAsync A))])]
+ "[1]::[0]"
+ (resolve [A] boolean)
+ (poll [] A)
+ (wasResolved [] boolean)
+ (waitOn [lux/Function] void)
+ ("static" [A] make [A] (lux/concurrency/async/JvmAsync A)))]
["Also, the names of the imported members will look like Class::member"
(java/lang/Object::new [])
(java/lang/Object::equals [other_object] my_object)