blob: cfb7c73e0e45fa4a0e73c5f21393d4dcf3247231 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
public abstract aspect PerCFlowCompileFromJar percflow( topOfFlow() ){
private boolean thisAspectInstanceIsDead = false;
protected abstract pointcut entryPoint();
protected pointcut topOfFlow(): entryPoint() && !cflowbelow( entryPoint() );
after() : topOfFlow() {
this.killThisAspectInstance();
}
protected void killThisAspectInstance(){
if (thisAspectInstanceIsDead)
throw new IllegalStateException("This aspect instance has been used and can't be used again.");
else
thisAspectInstanceIsDead = true;
}
}
|