aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base/test109/Aspect.java
blob: 4e77df375b81fd258dbdb0f924c6f1d430eeed86 (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
aspect Aspect pertarget(target(Foo)) {

  public String toString() {return "The Aspect";}

  before (Foo f): target(f) && call(* foo(..)) {
      // do some incrementing and reading of f's variables:
      // f.PRIVATECONST;          
      // f.privateClassVar++;      
      // f.privateInstanceVar++;
      f.protectedClassVar++;     
      f.protectedInstanceVar++;  
      f.publicClassVar++;        
      f.publicInstanceVar++;     
      f.ClassVar++;              
      f.InstanceVar++;           

      // do some calling of f's methods

      //f.privateClassMethod();
      //f.privateInstanceMethod();
      f.protectedClassMethod();
      f.protectedInstanceMethod();
      f.publicClassMethod();
      f.publicInstanceMethod();
      f.ClassMethod();
      f.InstanceMethod();
  }
}