Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] [1.5] Generic methods now supported



I just released changes which allow Cheetah to digest more evolved generic
method scenarii.

   public class X {
       public static void main(String [] args) {
           java.util.Collections.sort(new java.util.LinkedList<String>());
       }
   }

fyi, the method Collections#sort is spec'ed in a nasty way, as the bound
for variable T is referencing itself,
which makes the job for checking the bound of inferred type (String in
example above) a bit tricky.

   public static <T extends Comparable<? super T>> void sort(List<T> list)

We will sanity check the Cheetah, and post an updated preview shortly if
successful.




Back to the top