aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/autoboxing/AspectAfterReturning.aj
blob: 7a9b6e46c294c03ab71ef355dbda07cf4f7cc0d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
public aspect AspectAfterReturning {


  after() returning(int i): call(* ret*(..)) {
    System.err.println("Returning I="+i);
  }

  after() returning(Integer i): call(* ret*(..)) {
    System.err.println("Returning Integer="+i);
  }

  after() returning(Object i): call(* ret*(..)) {
    System.err.println("Returning Object="+i);
  }
  

  public static void main(String []argv) {
    retI();
    retInteger();
  }

  public static int retI() {
    return 5;
  }

  public static Integer retInteger() {
    return new Integer(10);
  }
   

}