[armedbear-cvs] r13071 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Tue Nov 30 19:58:16 UTC 2010


Author: mevenson
Date: Tue Nov 30 14:58:15 2010
New Revision: 13071

Log:
Add support for writing Java interfaces via the classwriter.

One can create interfaces as follows:

(let* ((class-name (make-jvm-class-name "org/not/Foo"))
       (class (make-class-file class-name +java-object+ '(:public :interface)))
       (method (make-jvm-method "callback" :int '(:int) :flags
                                '(:public :abstract))))
  (class-add-method class method)
  (finalize-class-file class)
  (with-open-file (s #p"Foo.class" :direction :output
                     :if-exists :supersede :element-type '(unsigned-byte 8))
    (write-class-file class s)))

Modified:
   trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp	Tue Nov 30 14:58:15 2010
@@ -778,6 +778,7 @@
     (:synchronized #x0020)
     (:transient    #x0080)
     (:native       #x0100)
+    (:interface    #x0200)
     (:abstract     #x0400)
     (:strict       #x0800))
   "List of keyword symbols used for human readable representation of (access)




More information about the armedbear-cvs mailing list