This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: define-simple-class + Java enum as annotation value = invalid Java class created


Hi Fushacko,

On 05.11.2012 18:32, Fushacko Tito wrote:
Did you try to decompile Test.class by JAD? How does it look?
Jad does not deal with annotations. jd-gui shows the following:

import javax.xml.bind.annotation.XmlAccessorType;

@XmlAccessorType(.FIELD)
public class Test
{
}

So no references to XmlAccessType whatsoever.

And also I don't see module-export line for <Test> class.
It does not help

Regards,
Vladimir

05.11.2012, 18:22, "Vladimir Tsichevski" <tsichevski@gmail.com>:
Hi all,

I'm trying to generate an annotated Java class:

(define-alias XmlAccessType javax.xml.bind.annotation.XmlAccessType)
(define-alias XmlAccessorType javax.xml.bind.annotation.XmlAccessorType)

(define-simple-class <Test> ()
    (@XmlAccessorType value: XmlAccessType:FIELD)
    )
;; (compile-file "scratch.scm" "out.zip")

where XmlAccessType is enum:

public enum XmlAccessType {
      PROPERTY,
      FIELD,
      PUBLIC_MEMBER,
      NONE
}

This results in a broken Java class "Test".

Regards,
Vladimir


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]