RE: Generic Signatures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeroen Frijters writes:
 > Andrew Haley wrote:
 > > I can't get even simple tests with generic signatures to work.  Like
 > > this:
 > > 
 > > public class test2
 > > {
 > >   static class A extends ArrayList<String> {};
 > > 
 > >   public static void main(String[] args)
 > >   {
 > >     A a = new A();
 > >     Object x = a;
 > >     ((Collection)x).add(new Byte((byte) 1));
 > >     System.out.println(x.getClass().getGenericSuperclass());
 > >     System.out.println("We have a list parametrized with: " +
 > >                        
 > > ((ParameterizedType)x.getClass().getGenericSuperclass()).getAc
 > > tualTypeArguments()[0]);
 > >   }
 > > }
 > 
 > This code works for me (on ikvm with classpath cvs head from a couple of
 > days ago).

OK, thanks.  I'll try a new classpath import to gcj.

Andrew.


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux