blob: 805bc412987ff9e8eede30ba396990c9dd20f2f9 (
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
26
|
package p;
aspect Checker {
declare warning: execution(* A.m(..)): "joinpoint location is {joinpoint.sourcelocation.sourcefile}:{joinpoint.sourcelocation.line}";
declare warning: execution(* A.m(..)): "joinpoint is {joinpoint}";
declare warning: execution(* A.m(..)): "joinpoint kind is {joinpoint.kind}";
declare warning: execution(* A.m(..)): "joinpoint kind is '{joinpoint.kind}'";
declare warning: execution(* A.m(..)): "joinpoint line is '{joinpoint.sourcelocation.line}'";
declare warning: execution(* A.m(..)): "joinpoint signature is {joinpoint.signature}";
declare warning: get(int *) && within(A): "joinpoint signature is {joinpoint.signature}";
declare warning: execution(* A.m(..)): "joinpoint declaring type is {joinpoint.signature.declaringType}";
declare warning: execution(* A.m(..)): "advice sourcelocation is {advice.sourcelocation.sourcefile}:{advice.sourcelocation.line}";
declare warning: get(int *): "aspect is {advice.aspecttype}";
declare warning: get(int *): "signature name for field is {joinpoint.signature.name}";
declare warning: execution(* A.m(..)): "signature name for method is {joinpoint.signature.name}";
declare warning: execution(* A.m(..)): "\\{}wibble";
declare warning: execution(* A.m(..)): "{}foobar";
declare warning: execution(* A.m(..)): "test {advice.sourcelocation.line}\\{}{joinpoint.sourcelocation.line}";
}
class A {
int i;
public void m() {
System.out.println(i);
}
}
|