You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PerCFlowCompileFromJar.java 534B

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