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.

Code.java 634B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. public class Code {
  2. public static void main(String[] args) {
  3. A.methodA();
  4. }
  5. }
  6. class A {
  7. public static void methodA() {
  8. B.methodB();
  9. }
  10. }
  11. class B {
  12. public static void methodB() {
  13. C.methodC();
  14. int a = 1;
  15. int b = 2;
  16. System.out.println( a + b );
  17. }
  18. }
  19. class C {
  20. public static void methodC() {
  21. D.methodD();
  22. }
  23. }
  24. class D {
  25. public static void methodD() {
  26. }
  27. }
  28. aspect CFlow {
  29. public pointcut flow() : cflow(call( * B.methodB() ) ) && !within(CFlow);
  30. before() : flow() {
  31. System.out.println( thisJoinPoint );
  32. }
  33. }