blob: 96ed0188d1a50e50b10ed140452c7fb50c916b07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
public aspect WithinAndWithinCodeTests {
// should be two matches, L32 and L39
declare warning : execution(* doSomething(..)) && @within(@MyAnnotation)
: "@within match on non-inherited annotation";
// one match on L39
declare warning : execution(* doSomething(..)) && @within(@MyInheritableAnnotation)
: "@within match on inheritable annotation";
// one match on L32
declare warning : call(* doSomething(..)) && @withincode(@MyClassRetentionAnnotation)
: "@withincode match";
}
|