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.

WeaveLocal.java 689B

12345678910111213141516171819202122232425262728293031323334353637
  1. // for Bug#: 32463
  2. import org.aspectj.testing.Tester;
  3. public class WeaveLocal
  4. {
  5. // Commenting out the static declaration makes everything work OK
  6. static
  7. {
  8. class StaticNestedClass
  9. {
  10. }
  11. }
  12. public static void main(String[] args)
  13. {
  14. System.out.println(new WeaveLocal().handleOrder("test"));
  15. }
  16. private String handleOrder(String t)
  17. {
  18. return t;
  19. }
  20. }
  21. aspect A {
  22. pointcut withinTest(): within(WeaveLocal);
  23. pointcut callToHandleOrder() : (withinTest() &&
  24. call(* handleOrder(..)));
  25. Object around(): callToHandleOrder() {
  26. return "DUMMY inserted by ASPECT" ;
  27. }
  28. }