blob: 2e4f77f347ffa98976133d1710a39f7125fc4e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
public aspect NameAspect {
declare parents: @InjectName * implements Named;
/*
* The injection of that method interferes with the declare
* statements in MarkMyMethodsAspect
*/
public String Named.getName() { return name; }
private String Named.name;
after(Named newinstance) : execution(Named+.new(..)) && target(newinstance) {
System.out.println("A new name was created");
newinstance.name = "TikaTikaSlimShady";
}
}
|