Re: Tim Boudreau doesn't like getModel() -> getDefaultModel()
'IModel<?> getModel()' instead of 'Object getModel()', and 'IModel<T>
getModel()' instead of 'T getModel()', sorry.
And sorry for flooding the mailing list, this is the last one, I promise :)
On Mon, Jul 6, 2009 at 3:54 PM, tetsuo <ronald.tetsuo@...> wrote:
> What if Component was not generified, and had an 'Object getModel()' method
> instead of 'Object getDefaultModel()', and the components that do benefit
> from generics, simply override the method to return 'T' (then the component
> class would have a <T> type parameter)? The compiler accepts this just fine.
> On Mon, Jul 6, 2009 at 3:48 PM, tetsuo <ronald.tetsuo@...> wrote:
>> I've just read the explanation in a Tim's blog post comment. Oh, well,
>> generics definitely isn't easy to grasp...
>> I myself have observed that my (wicket) code is so much readable without
>> most generics declarations. Even when using components that do have models
>> (Textfield, for example) I didn't gain anything for adding the angle
>> brackets, since the models in general use reflection (PropertyModel,
>> CompoundPropertyModel, etc.), and don't make any use of the build-time
>> validation at all.