diff --git a/contrib/jss/invoke.lisp b/contrib/jss/invoke.lisp
index 573727e..08b5032 100644
a
|
b
|
CLASS-NAME may either be a symbol or a string according to the usual JSS convent |
324 | 324 | :reader object |
325 | 325 | )) |
326 | 326 | (:report (lambda (c stream) |
327 | | (error 'no-such-java-field :field-name field :object object)))) |
| 327 | (format stream "Unable to find a FIELD named ~a for ~a" |
| 328 | (field-name c) (object c)))) |
| 329 | ) |
328 | 330 | |
329 | 331 | (defun get-java-field (object field &optional (try-harder *running-in-osgi*)) |
330 | 332 | "Get the value of the FIELD contained in OBJECT. |
… |
… |
If OBJECT is a symbol it names a dot qualified static FIELD." |
338 | 340 | (jfield (if (java-object-p field) |
339 | 341 | field |
340 | 342 | (or (find-declared-field field class) |
341 | | (error "Unable to find a FIELD named ~a for ~a" |
342 | | field object))))) |
| 343 | (error 'no-such-java-field :field-name field :object object))))) |
343 | 344 | (#"setAccessible" jfield +true+) |
344 | 345 | (values (#"get" jfield object) jfield)) |
345 | 346 | (if (symbolp object) |
… |
… |
all superclasses of CLASS. |
364 | 365 | (find fieldname (#"getDeclaredFields" class) |
365 | 366 | :key 'jfield-name :test 'equal)) |
366 | 367 | |
367 | | ;; TODO use #"getSuperclass" and #"getInterfaces" to see whether there |
368 | | ;; are fields in superclasses that we might set |
369 | 368 | (defun set-java-field (object field value &optional (try-harder *running-in-osgi*)) |
370 | 369 | "Set the FIELD of OBJECT to VALUE. |
371 | 370 | If OBJECT is a symbol, it names a dot qualified Java class to look for |