blob: 139b72d5d3abf8c72e0756a80b3243cfb2297f6c (
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";
}
|