aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/target/jvm/reflection.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/target/jvm/reflection.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/lux/target/jvm/reflection.lux b/stdlib/source/lux/target/jvm/reflection.lux
index bb0a388e9..07afd5df0 100644
--- a/stdlib/source/lux/target/jvm/reflection.lux
+++ b/stdlib/source/lux/target/jvm/reflection.lux
@@ -1,6 +1,6 @@
(.module:
[lux (#- type)
- ["." host (#+ import:)]
+ ["." ffi (#+ import:)]
["." type]
[abstract
["." monad (#+ do)]]
@@ -142,7 +142,7 @@
(-> (-> java/lang/reflect/Type (Try (/.Type Parameter)))
java/lang/reflect/Type
(Try (/.Type Class)))
- (<| (case (host.check java/lang/Class reflection)
+ (<| (case (ffi.check java/lang/Class reflection)
(#.Some class)
(let [class_name (|> class
(:coerce (java/lang/Class java/lang/Object))
@@ -163,10 +163,10 @@
(exception.throw ..not_a_class reflection)
(#try.Success (/.class class_name (list))))))
_)
- (case (host.check java/lang/reflect/ParameterizedType reflection)
+ (case (ffi.check java/lang/reflect/ParameterizedType reflection)
(#.Some reflection)
(let [raw (java/lang/reflect/ParameterizedType::getRawType reflection)]
- (case (host.check java/lang/Class raw)
+ (case (ffi.check java/lang/Class raw)
(#.Some raw)
(do {! try.monad}
[paramsT (|> reflection
@@ -186,11 +186,11 @@
(def: #export (parameter reflection)
(-> java/lang/reflect/Type (Try (/.Type Parameter)))
- (<| (case (host.check java/lang/reflect/TypeVariable reflection)
+ (<| (case (ffi.check java/lang/reflect/TypeVariable reflection)
(#.Some reflection)
(#try.Success (/.var (java/lang/reflect/TypeVariable::getName reflection)))
_)
- (case (host.check java/lang/reflect/WildcardType reflection)
+ (case (ffi.check java/lang/reflect/WildcardType reflection)
(#.Some reflection)
## TODO: Instead of having single lower/upper bounds, should
## allow for multiple ones.
@@ -198,7 +198,7 @@
(array.read 0 (java/lang/reflect/WildcardType::getUpperBounds reflection))]
(^template [<pattern> <kind>]
[<pattern>
- (case (host.check java/lang/reflect/GenericArrayType bound)
+ (case (ffi.check java/lang/reflect/GenericArrayType bound)
(#.Some _)
## TODO: Array bounds should not be "erased" as they
## are right now.
@@ -221,7 +221,7 @@
(def: #export (type reflection)
(-> java/lang/reflect/Type (Try (/.Type Value)))
- (<| (case (host.check java/lang/Class reflection)
+ (<| (case (ffi.check java/lang/Class reflection)
(#.Some reflection)
(let [class_name (|> reflection
(:coerce (java/lang/Class java/lang/Object))
@@ -243,7 +243,7 @@
(<t>.run /parser.value (|> class_name //name.internal //name.read))
(#try.Success (/.class class_name (list)))))))
_)
- (case (host.check java/lang/reflect/GenericArrayType reflection)
+ (case (ffi.check java/lang/reflect/GenericArrayType reflection)
(#.Some reflection)
(|> reflection
java/lang/reflect/GenericArrayType::getGenericComponentType
@@ -256,7 +256,7 @@
(def: #export (return reflection)
(-> java/lang/reflect/Type (Try (/.Type Return)))
(with_expansions [<else> (as_is (..type reflection))]
- (case (host.check java/lang/Class reflection)
+ (case (ffi.check java/lang/Class reflection)
(#.Some class)
(let [class_name (|> reflection
(:coerce (java/lang/Class java/lang/Object))
@@ -358,7 +358,7 @@
(def: #export deprecated?
(-> (array.Array java/lang/annotation/Annotation) Bit)
(|>> array.to_list
- (list.all (|>> (host.check java/lang/Deprecated)))
+ (list.all (|>> (ffi.check java/lang/Deprecated)))
list.empty?
not))