Ignore:
Timestamp:
12/30/09 22:46:31 (11 years ago)
Author:
astalla
Message:

Implemented (setf jfield).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/java.lisp

    r11940 r12315  
    218218  (jcall (jmethod "java.lang.reflect.Field" "getName") field))
    219219
     220
     221(defun (setf jfield) (newvalue class-ref-or-field field-or-instance
     222          &optional (instance nil instance-supplied-p) unused-value)
     223  (declare (ignore unused-value))
     224  (if instance-supplied-p
     225      (jfield class-ref-or-field field-or-instance instance newvalue)
     226      (jfield class-ref-or-field field-or-instance newvalue)))
     227
    220228(defun jclass-methods (class &key declared public)
    221229  "Return a vector of all (or just the declared/public, if DECLARED/PUBLIC is true) methods of CLASS"
     
    228236  (jcall (jmethod "java.lang.reflect.Method" "getParameterTypes") method))
    229237
    230 ;; (defun jmethod-return-type (method)
    231 ;;   "Returns the result type (Java class) of the METHOD"
    232 ;;   (jcall (jmethod "java.lang.reflect.Method" "getReturnType") method))
     238(defun jmethod-return-type (method)
     239  "Returns the result type (Java class) of the METHOD"
     240  (jcall (jmethod "java.lang.reflect.Method" "getReturnType") method))
     241
     242(defun jmethod-declaring-class (method)
     243  "Returns the Java class declaring METHOD"
     244  (jcall (jmethod "java.lang.reflect.Method" "getDeclaringClass") method))
    233245
    234246(defun jmethod-name (method)
Note: See TracChangeset for help on using the changeset viewer.