i added my comments on how generics should be in a javalobby/dzone thread about java 7:
http://java.dzone.com/articles/java-7-and-art-patience couldnt help myself :) I think java 7 could help wicket in 2 areas generics: class Foo<T default Void> { Foo(){} Foo(Bar<T>){} } better type inference Foo foo = new Foo(new Bar<String>()); then foo is types as String the default keyword.Foo foo = new Foo(); then foo is typed to Void Properties like: Person#name (same as reflection but then dont have the string) Person#address#country#name, this then returns a wrapper around that class where you can say on get(personObject) and ofcourse can handle nulls. (set can be a bit tricky with nulls, what to do then..) or even on instances personObject#name where you then can call the value from personObject#name.get() gets the value johan On Tue, Oct 28, 2008 at 12:23 PM, Artur W. <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > In the weekend I tried to migrate our application to wicket 1.4. > I was very happy to use generics with wicket but now I frustrated. > > I love Wicket and I know it is nobody fault (it java fault! :)) but the > generics sucks. > > Our application is quite big, more than one thousand classes and after > adding generics > the code looks awful and it is unreadable. I could live with that but > especially frustrating are > more than 4.000 warnings that I have now. > > Most of them I cannot fix. For example the warnings apply to the components > that don't have models but I have to add them a type. What type? Any? > Example: > > add(new Link("link") { //warning here > @Override > public void onClick() { > //do something here > } > }); > > I have a warning here because I didn't set a type of Link. But it doesn't > have any model. I know I can add @SuppressWarnings("unchecked") but I don't > want to do > that in more than 4000 places in my code. If I do than I will loose all the > warnign event that I would to have or could save me in the future. > > So a question is there any way to workaround about this warnings problem? > I don't want to stay with wicket 1.3 because I realize that it will be > abandon in a year or something. > > > Thanks in advance, > Artur > > -- > View this message in context: > http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205449.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
