Implement MAKE-LOAD-FORM for Java fields (Alan Ruttenberg)

<https://github.com/armedbear/abcl/pull/38>
parent a60524d1
......@@ -381,6 +381,15 @@ calls on the java.util.Enumeration `jenumeration`."
object)
collecting
(jclass-name arg-type))))
((string= class-name "java.lang.reflect.Field")
`(let ((field
(find ,(jcall "getName" object)
(jcall "getDeclaredFields"
,(jcall "getDeclaringClass" object))
:key (lambda(el) (jcall "getName" el))
:test 'equal)))
(jcall "setAccessible" field t)
field))
((jinstance-of-p object "java.lang.Class")
`(java:jclass ,(jcall (jmethod "java.lang.Class" "getName") object)))
(t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment