we are still discussing on how to do this properly with generics, so stay tuned.
we are also discussing whether o rnot an override like yours is proper
since you are completely ignoring the type argument.
-igor
On Sat, May 31, 2008 at 1:16 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>
> Hi Igor,
>
> I've just upgraded to the trunk and my custom converters no longer compile.
> I used to have this:
>
> public class PercentLabel extends Label<Double>
> {
> /* snip */
>
> public IConverter<Double> getConverter(Class<Double> type)
> {
> return new PercentConverter(fractionDigits);
> }
> }
>
> Where PercentConverter is defined as
>
> public class PercentConverter extends AbstractDecimalConverter<Double>
>
> How am I supposed to declare this properly now? The only thing I can get to
> compile is ...
>
> public IConverter getConverter(Class type)
> {
> return new PercentConverter(fractionDigits);
> }
>
> ...but that gets me unchecked / raw use of parametrized type warnings. I
> haven't done much generics work with the public <X> IConverter<X>
> getConverter(Class<X> type) format. What is the right way to do this?
>
> Thanks,
>
> -Doug
> --
> View this message in context:
> http://www.nabble.com/iconverterlocator%2Bgenerics-tp17462585p17579216.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>