blob: a1730c12639586cb50ef2d13704a8d6bf558d80a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
public aspect WithincodePointcutMatching {
// rule 1) you can't use generic or parameterized type patterns in the declaring type position
pointcut tryWcGeneric() : withincode(* Generic<T>.*(..)); // CE L 4
pointcut tryWcParameterized() : withincode(* Generic<String>.*(..)); // CE L5
pointcut badThrows() : withincode(* Generic.*(..) throws Ex*<String>); // CE L6
}
class Generic<T> {
T foo = null;
T getFoo() {
return foo;
}
}
|