Re: Fwd: Re: [SrcML] Java 1.5 update
Status: Beta
Brought to you by:
crashchaos
From: Frank R. <fra...@in...> - 2005-05-28 11:02:04
|
On Sat, May 28, 2005 at 12:08:35PM +0200, Dennis Waldherr wrote: > >Well the List interface specifies addAll to be "|*addAll > ><http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#addAll%28java.util.Collection%29>*(Collection > ><http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html><? > >extends E <http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html>> > >c)|" in which the "second" E (being '?') may differ as long as it's > >subtype of the first E. > > O o > > Ok this link garbage wasn't meant to be sent... actually I wanted to write > addAll(<? extends Collection>) > > (good work Thunderbird :/ ) > - > Dennis That's why we have you on the project :).. I found the main problem of this kind to occur in the PrintSelectionJava plugin with a return type of Vector<Vector<SrcMLElement>> which I have now changed to use Vector<Vector<? extends SrcMLElement>>. This needed a few more changes, but works out great when adding List<Method> or similar objects. Thanks for the pointer. We'll still have to make some more modifications to the existing source (f.ex. changing those Vectors to Lists), but so far the addition of generics seems to be rather unproblematic and the new for loops alone justify the switch. -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) If you want truly to understand something, try to change it. (Kurt Lewin) |