|
From: Bill B. <bb...@re...> - 2008-11-13 18:09:43
|
Michael Brackx wrote:
> On Thu, Nov 13, 2008 at 6:51 PM, Bill Burke <bb...@re...> wrote:
>> I looked at the code and it seems that the @DefaultValue is run through the
>> converter. Are you not seeing that behavior?
>
> Yes i do (actually, i added a test case for that)
> What i meant is not specifying the default as string, but as an object.
>
> @DefaultValue(new Pojo("default"))
>
> otherwise you would need to convert the value yourself
>
> @DefaultValue(new PojoStingConverter().toString(new Pojo("default")))
>
Both are illegal. You can only use primitive constants within
annotations as they are compiled directly into the bytecode.
Bill
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|