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.

Choice.java 523B

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