diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/target/jvm/reflection.lux | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index 5745ecd89..086a394bb 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -132,14 +132,14 @@ (#try.Success class) (#try.Failure _) - (exception.throw ..unknown_class name))) + (exception.except ..unknown_class name))) (def: #export (sub? class_loader super sub) (-> java/lang/ClassLoader External External (Try Bit)) (do try.monad [super (..load class_loader super) sub (..load class_loader sub)] - (wrap (java/lang/Class::isAssignableFrom sub super)))) + (in (java/lang/Class::isAssignableFrom sub super)))) (def: (class' parameter reflection) (-> (-> java/lang/reflect/Type (Try (/.Type Parameter))) @@ -163,7 +163,7 @@ [/reflection.double] [/reflection.char])) (text.starts_with? /descriptor.array_prefix class_name)) - (exception.throw ..not_a_class reflection) + (exception.except ..not_a_class reflection) (#try.Success (/.class class_name (list)))))) _) (case (ffi.check java/lang/reflect/ParameterizedType reflection) @@ -176,16 +176,16 @@ java/lang/reflect/ParameterizedType::getActualTypeArguments array.to_list (monad.map ! parameter))] - (wrap (/.class (|> raw - (:as (java/lang/Class java/lang/Object)) - java/lang/Class::getName) - paramsT))) + (in (/.class (|> raw + (:as (java/lang/Class java/lang/Object)) + java/lang/Class::getName) + paramsT))) _ - (exception.throw ..not_a_class raw))) + (exception.except ..not_a_class raw))) _) ## else - (exception.throw ..cannot_convert_to_a_lux_type reflection))) + (exception.except ..cannot_convert_to_a_lux_type reflection))) (def: #export (parameter reflection) (-> java/lang/reflect/Type (Try (/.Type Parameter))) @@ -309,22 +309,22 @@ (dictionary.put name paramT mapping)) /lux.fresh) #try.Success) - (exception.throw ..type_parameter_mismatch [num_class_params num_type_params class type])) - (exception.throw ..cannot_correspond [class type]))) + (exception.except ..type_parameter_mismatch [num_class_params num_type_params class type])) + (exception.except ..cannot_correspond [class type]))) (#.Named name anonymousT) (correspond class anonymousT) (#.Apply inputT abstractionT) - (case (type.apply (list inputT) abstractionT) + (case (type.applied (list inputT) abstractionT) (#.Some outputT) (correspond class outputT) #.None - (exception.throw ..non_jvm_type [type])) + (exception.except ..non_jvm_type [type])) _ - (exception.throw ..non_jvm_type [type]))) + (exception.except ..non_jvm_type [type]))) (exception: #export (mistaken_field_owner {field java/lang/reflect/Field} {owner (java/lang/Class java/lang/Object)} @@ -353,10 +353,10 @@ (let [owner (java/lang/reflect/Field::getDeclaringClass field)] (if (is? owner target) (#try.Success field) - (exception.throw ..mistaken_field_owner [field owner target]))) + (exception.except ..mistaken_field_owner [field owner target]))) (#try.Failure _) - (exception.throw ..unknown_field [field target]))) + (exception.except ..unknown_field [field target]))) (def: #export deprecated? (-> (array.Array java/lang/annotation/Annotation) Bit) @@ -377,7 +377,7 @@ ..type (\ ! map (|>> [(java/lang/reflect/Modifier::isFinal modifiers) (..deprecated? (java/lang/reflect/Field::getDeclaredAnnotations fieldJ))]))) - <else?> (exception.throw <exception> [field class]))))] + <else?> (exception.except <exception> [field class]))))] [static_field ..not_a_static_field #1 #0] [virtual_field ..not_a_virtual_field #0 #1] |