> public <W> IWrapModel<W> wrapOnInheritance(Component component,Class<W>
> type)

The Class<W> parameter is only needed if you intend to do "new W();" or the 
like in the method (the Class is then something the compiler can grab hold of 
for calling the constructor). For just passing the type parameter to other 
generic classes it is not needed. The compiler sees the context (i.e. the 
left-hand side of an assignment) and if it cannot determine the type it will 
say "needs a cast" as a warning, but the code will compile since it's all 
Object anyway. 

- Tor Iver

Reply via email to