users@jaxb.java.net

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

From: Schaefer, Don <dschaefer1_at_paychex.com>
Date: Tue, 10 May 2011 15:15:42 -0400

Lexi,

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

.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?

Thanks,
Don.

-----Original Message-----
From: aleksei.valikov_at_gmail.com [mailto:aleksei.valikov_at_gmail.com] On Behalf Of Aleksei Valikov
Sent: Tuesday, May 10, 2011 3:02 PM
To: users_at_jaxb.java.net
Subject: Re: Working on a plugin - need to add a method that returns an array...

Hi,

> Working on a plugin and have a question.  When creating a new method I need to specify a return type for the method that has a return type of an array.  For example - String[].
>
> How can I accomplish this?
>
>
>
> // snippet
>
> JDefinedClass definedClass = ..
>
>
>
> // ?? should be specifying the array.
>
> definedClass.method(JMod.PUBLIC, ???, "getArrayOfStuff");

Have you tried the most obvious definedClass.array()?

Bye,
/lexi

ps. I love this type of disclaimer in mails sent to public mailinf lists:

> The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.