Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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. }