aboutsummaryrefslogtreecommitdiffstats
path: root/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareAnnotations.aj
blob: 46bda48f8c72e7f91eac697ebdc8a2fd2cc8f895 (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
// little aspect and class for testing declaration of annotations

@interface anInterface {}

public aspect AspectDeclareAnnotations{

  declare @type : Test : @anInterface;
  declare @constructor : Test.new(String,int) : @anInterface;
  declare @method : int Test.fac(int) : @anInterface;
  declare @field : int Test.a : @anInterface;

}

class Test{

  public Test(String say, int something){
    System.out.println(say + something);
  }

  public int fac(int n){
   return (n == 0)? 1 : n * fac(n-1);
  }

  public int a = 1;
}