Changeset 12778


Ignore:
Timestamp:
07/03/10 22:05:13 (11 years ago)
Author:
ehuelsmann
Message:

Managing field/method/attribute attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

    r12777 r12778  
    391391
    392392(defun class-methods-by-name (class name)
    393   (remove (map-method-name name) (class-file-methods class)
     393  (remove name (class-file-methods class)
    394394          :test-not #'string= :key #'method-name))
    395395
    396 (defun class-method (class descriptor)
    397   (find descriptor (class-file-methods class)
    398         :test #'string= :key #'method-name))
     396(defun class-method (class name return &rest args)
     397  (let ((return-and-args (cons return args)))
     398    (find-if #'(lambda (c)
     399                 (and (string= (method-name c) name)
     400                      (equal (method-descriptor c) return-and-args)))
     401             (class-file-methods class))))
     402
     403(defun class-add-attribute (class attribute)
     404  (push atttribute (class-file-attributes class)))
     405
     406(defun class-attribute (class name)
     407  (find name (class-file-attributes class)
     408        :test #'string= :key #'attribute-name))
    399409
    400410
     
    522532               :descriptor type))
    523533
    524 (defun add-field-attribute (field attribute)
     534(defun field-add-attribute (field attribute)
    525535  (push attribute (field-attributes field)))
    526536
     537(defun field-attribute (field name)
     538  (find name (field-attributes field)
     539        :test #'string= :key #'attribute-name))
    527540
    528541(defun finalize-field (field class)
Note: See TracChangeset for help on using the changeset viewer.