Changeset 13071 for trunk/abcl/src/org


Ignore:
Timestamp:
11/30/10 19:58:15 (11 years ago)
Author:
Mark Evenson
Message:

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)))

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.