You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Pr109283.aj 477B

123456789101112131415161718192021222324252627
  1. import java.util.*;
  2. public class Pr109283 {
  3. enum Foo { Wibble, Wobble, Woo }
  4. public static void main(String[] args) throws Exception {
  5. EnumSet<Foo> set = EnumSet.noneOf(Foo.class);
  6. C c2 = Recipient.instanceOf(C.class);
  7. }
  8. }
  9. class C {}
  10. class Recipient {}
  11. aspect Donor {
  12. static <E> E Recipient.first(List<E> elements) { return elements.get(0); }
  13. public static <T> T Recipient.instanceOf(Class<T> aT) throws Exception {
  14. return aT.newInstance();
  15. }
  16. }