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.lux95
1 files changed, 53 insertions, 42 deletions
diff --git a/stdlib/source/lux/target/jvm/reflection.lux b/stdlib/source/lux/target/jvm/reflection.lux
index 12c310bca..4dfdbc30c 100644
--- a/stdlib/source/lux/target/jvm/reflection.lux
+++ b/stdlib/source/lux/target/jvm/reflection.lux
@@ -31,65 +31,76 @@
(import: java/lang/String)
(import: java/lang/Object
- (toString [] java/lang/String)
- (getClass [] (java/lang/Class java/lang/Object)))
+ ["#::."
+ (toString [] java/lang/String)
+ (getClass [] (java/lang/Class java/lang/Object))])
(import: java/lang/reflect/Type
- (getTypeName [] java/lang/String))
+ ["#::."
+ (getTypeName [] java/lang/String)])
(import: java/lang/reflect/GenericArrayType
- (getGenericComponentType [] java/lang/reflect/Type))
+ ["#::."
+ (getGenericComponentType [] java/lang/reflect/Type)])
(import: java/lang/reflect/ParameterizedType
- (getRawType [] java/lang/reflect/Type)
- (getActualTypeArguments [] [java/lang/reflect/Type]))
+ ["#::."
+ (getRawType [] java/lang/reflect/Type)
+ (getActualTypeArguments [] [java/lang/reflect/Type])])
(import: (java/lang/reflect/TypeVariable d)
- (getName [] java/lang/String)
- (getBounds [] [java/lang/reflect/Type]))
+ ["#::."
+ (getName [] java/lang/String)
+ (getBounds [] [java/lang/reflect/Type])])
(import: (java/lang/reflect/WildcardType d)
- (getLowerBounds [] [java/lang/reflect/Type])
- (getUpperBounds [] [java/lang/reflect/Type]))
+ ["#::."
+ (getLowerBounds [] [java/lang/reflect/Type])
+ (getUpperBounds [] [java/lang/reflect/Type])])
(import: java/lang/reflect/Modifier
- (#static isStatic [int] boolean)
- (#static isFinal [int] boolean)
- (#static isInterface [int] boolean)
- (#static isAbstract [int] boolean))
+ ["#::."
+ (#static isStatic [int] boolean)
+ (#static isFinal [int] boolean)
+ (#static isInterface [int] boolean)
+ (#static isAbstract [int] boolean)])
(import: java/lang/reflect/Field
- (getDeclaringClass [] (java/lang/Class java/lang/Object))
- (getModifiers [] int)
- (getGenericType [] java/lang/reflect/Type))
+ ["#::."
+ (getDeclaringClass [] (java/lang/Class java/lang/Object))
+ (getModifiers [] int)
+ (getGenericType [] java/lang/reflect/Type)])
(import: java/lang/reflect/Method
- (getName [] java/lang/String)
- (getModifiers [] int)
- (getDeclaringClass [] (java/lang/Class java/lang/Object))
- (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)])
- (getGenericParameterTypes [] [java/lang/reflect/Type])
- (getGenericReturnType [] java/lang/reflect/Type)
- (getGenericExceptionTypes [] [java/lang/reflect/Type]))
+ ["#::."
+ (getName [] java/lang/String)
+ (getModifiers [] int)
+ (getDeclaringClass [] (java/lang/Class java/lang/Object))
+ (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)])
+ (getGenericParameterTypes [] [java/lang/reflect/Type])
+ (getGenericReturnType [] java/lang/reflect/Type)
+ (getGenericExceptionTypes [] [java/lang/reflect/Type])])
(import: (java/lang/reflect/Constructor c)
- (getModifiers [] int)
- (getDeclaringClass [] (java/lang/Class c))
- (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))])
- (getGenericParameterTypes [] [java/lang/reflect/Type])
- (getGenericExceptionTypes [] [java/lang/reflect/Type]))
+ ["#::."
+ (getModifiers [] int)
+ (getDeclaringClass [] (java/lang/Class c))
+ (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))])
+ (getGenericParameterTypes [] [java/lang/reflect/Type])
+ (getGenericExceptionTypes [] [java/lang/reflect/Type])])
(import: (java/lang/Class c)
- (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object))
- (getName [] java/lang/String)
- (getModifiers [] int)
- (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean)
- (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))])
- (getGenericInterfaces [] [java/lang/reflect/Type])
- (getGenericSuperclass [] #? java/lang/reflect/Type)
- (getDeclaredField [java/lang/String] #try java/lang/reflect/Field)
- (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)])
- (getDeclaredMethods [] [java/lang/reflect/Method]))
+ ["#::."
+ (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object))
+ (getName [] java/lang/String)
+ (getModifiers [] int)
+ (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean)
+ (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))])
+ (getGenericInterfaces [] [java/lang/reflect/Type])
+ (getGenericSuperclass [] #? java/lang/reflect/Type)
+ (getDeclaredField [java/lang/String] #try java/lang/reflect/Field)
+ (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)])
+ (getDeclaredMethods [] [java/lang/reflect/Method])])
(exception: #export (unknown-class {class External})
(exception.report
@@ -188,7 +199,7 @@
(#try.Success /.wildcard)
_
- (:: try.monad map <kind> (..class' parameter bound)))])
+ (\ try.monad map <kind> (..class' parameter bound)))])
([[_ (#.Some bound)] /.upper]
[[(#.Some bound) _] /.lower])
@@ -231,7 +242,7 @@
(|> reflection
java/lang/reflect/GenericArrayType::getGenericComponentType
type
- (:: try.monad map /.array))
+ (\ try.monad map /.array))
_)
## else
(..parameter reflection)))
@@ -348,7 +359,7 @@
<then?> (|> fieldJ
java/lang/reflect/Field::getGenericType
..type
- (:: ! map (|>> [(java/lang/reflect/Modifier::isFinal modifiers)])))
+ (\ ! map (|>> [(java/lang/reflect/Modifier::isFinal modifiers)])))
<else?> (exception.throw <exception> [field class]))))]
[static-field ..not-a-static-field #1 #0]