users@jaxb.java.net

Re: Working on a plugin - need to add a method that returns an array...

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 10 May 2011 22:37:28 +0200

Hi,

> Thanks for your response.  (The footer is obviously not of my generation...)

Yes, I understand, was not a reproach. :)

> .array() seems serviceable enough but here is another likely obvious question:
>
> How do I get a JClass (or JDefinedClass) representation for String to invoke array() upon?

JCodeModel.ref(String.class)

If you're interested in usage examples of CodeModel, check JAXB2
Basics, for instance. There's a lot of relevant code:

http://java.net/projects/jaxb2-commons/sources/svn/show/basics/trunk

Or Hyperjaxb3.

Bye,
/lexi