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.

ParenthesisedAJKeywords.java 899B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * https://github.com/eclipse-aspectj/aspectj/issues/20
  3. */
  4. public class ParenthesisedAJKeywords {
  5. public static void main(String[] args) {
  6. boolean before = true;
  7. int after = 11;
  8. String around = "around";
  9. boolean aspect = true;
  10. int pointcut = 22;
  11. String declare = "declare";
  12. String privileged = "privileged";
  13. if ((before)) {
  14. System.out.println(foo((before)));
  15. switch ((after)) {
  16. default: System.out.println("after");
  17. }
  18. System.out.println((around));
  19. System.out.println(!(aspect) ? "no aspect" : "aspect");
  20. switch ((pointcut)) {
  21. case 22: System.out.println("pointcut"); break;
  22. default: System.out.println("xxx");
  23. }
  24. System.out.println((declare));
  25. System.out.println((privileged));
  26. }
  27. }
  28. public static String foo(boolean before) {
  29. return (before) ? "before" : "after";
  30. }
  31. }