Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

GenericsLost5.java 449B

12345678910111213141516171819
  1. import java.util.*;
  2. import java.lang.reflect.*;
  3. // generic field itd
  4. aspect Foo {
  5. public List<String> Goo.ls;
  6. }
  7. class Goo {}
  8. public class GenericsLost5 {
  9. public static void main(String[]argv) throws Exception {
  10. Field f = Goo.class.getDeclaredField("ls");
  11. Type t = f.getGenericType();
  12. if (!t.toString().equals("java.util.List<java.lang.String>"))
  13. throw new RuntimeException("Incorrect signature. Signature is "+t);
  14. }
  15. }