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.

Choice2.java 535B

1234567891011121314151617181920212223242526272829303132
  1. import java.util.*;
  2. public class Choice2 {
  3. public static void main(String []argv) {
  4. System.out.println(Bar.Keys.CHOICE);
  5. }
  6. }
  7. class Bar {
  8. }
  9. aspect X {
  10. static List<Bar> choices;
  11. public static List forClass() {
  12. ArrayList al = new ArrayList();
  13. return al;
  14. }
  15. public static class Bar.Keys {
  16. public static final Function<Object, Bar> CHOICE = Get.attrOf(choices,"choice");
  17. }
  18. }
  19. class Get {
  20. public static <T> Function<Object,T> attrOf(List<T> t,String s) {
  21. return null;
  22. }
  23. }
  24. class Function<A,B> {
  25. }