users@jaxb.java.net

CodeModel and nested annotations

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Wed, 11 Jun 2008 08:15:20 +0100

Morning folks,

I'm trying to figure out how to set up nested annotations using the XJC
CodeModel.

For example, I want to generate this sort of thing:

@X({
   @Y(a="b"),
   @Y(c="d")
})
public class C {}

Once I've added the @X (using JAnnotatable.annotate), the returned
JAnnotationUse object doesn't seem to offer a way of adding the @Y
array, it only offers methods to add scalar parameters.

What am I missing?

kenny