blob: 70c402ce1aa0bec5d1b00a599ad5b22307e53a1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME) @interface Color { String value();}
@Retention(RetentionPolicy.RUNTIME) @interface Fruit { String value();}
public aspect DecaTypeBin3 {
declare @type: A : @Color("Yellow");
declare @type: A : @Fruit("Banana");
}
aspect X {
before(): execution(* *(..)) && @this(Color) {
System.err.println("Color identified on "+thisJoinPoint);
}
before(): execution(* *(..)) && @this(Fruit) {
System.err.println("Fruit identified on "+thisJoinPoint);
}
}
|