« Return to Thread: users, please give us your opinion: what is your take on generics with Wicket

RE: users, please give us your opinion: what is your take on generics with Wicket

by Brill Pappin :: Rate this Message:

Reply to Author | View in Thread

+1

I think that's the right thing to do... No point making it so rigid.

- Brill Pappin

-----Original Message-----
From: jcarman@... [mailto:jcarman@...] On
Behalf Of James Carman
Sent: Monday, June 02, 2008 12:13 PM
To: users@...
Subject: Re: users, please give us your opinion: what is your take on
generics with Wicket

On Mon, Jun 2, 2008 at 12:11 PM, Sebastiaan van Erk <sebster@...>
wrote:
> A raw type is a parameterized type in which the type parameters are
> not filled in, i.e., new HashMap() (instead of new HashMap<String,
Integer>()).
>
> Just try to return one of your old (non-generified) HomePage.class
> classes (i.e., HomePage extends WebPage instead of HomePage extends
> WebPage<Void>) in your WebApplication's getHomePage() method, and you
> will see that it does not compile.

There is a section on the wiki addressing this now.  I would propose that
whenever referring to "class objects that represent Page subclasses" we use
Class<? extends Page> rather than Class<? extends Page<?>>.  This allows us
to specify that it has to be a page class, but it doesn't make the page
class have to be generified.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: users, please give us your opinion: what is your take on generics with Wicket