Changeset 15597
- Timestamp:
- 11/27/22 00:22:36 (4 months ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp
r15596 r15597 1688 1688 (finalize-annotation ann class))) 1689 1689 1690 ;; See https://github.com/openjdk/jdk/blob/8758b554a089af98fdc3be4201d61278d5f01af3/src/java.base/share/classes/sun/reflect/generics/parser/SignatureParser.java#L295-L312 1691 (defun class-name->type-signature (class-name) 1692 (concatenate 'string 1693 '(#\L) 1694 (substitute #\/ #\. class-name) 1695 '(#\;))) 1696 1690 1697 (defun finalize-annotation (ann class) 1691 1698 (setf (annotation-type ann) 1692 (pool-add-class (class-file-constants class) (annotation-type ann))) 1699 (pool-add-utf8 (class-file-constants class) 1700 (class-name->type-signature (annotation-type ann)))) 1693 1701 (dolist (elem (annotation-elements ann)) 1694 1702 (finalize-annotation-element elem class))) -
trunk/abcl/test/lisp/abcl/runtime-class.lisp
r15570 r15597 74 74 20) 75 75 "#<FooList [Foo, Foo,") 76 77 78 ;; class annotations 79 (deftest runtime-class.class-annotations 80 (let* ((class (java:jnew-runtime-class 81 "Foo" 82 :annotations '("java.lang.Deprecated"))) 83 (annotations (java:jcall "getAnnotations" class))) 84 (assert (java:jinstance-of-p (aref annotations 0) "java.lang.Deprecated")) 85 t) 86 t)
Note: See TracChangeset
for help on using the changeset viewer.