Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is it possible?

Hi Macneil,

Still not working (bellow the 2 aspects)...

André

abstract aspect AbstractMethodInterception {
  abstract pointcut calls();
}

public aspect MethodInterception extends
AbstractMethodInterception {
  pointcut calls() : call(* *(..));

  before() : call(MethodInterception.new(..)) {
    System.out.println("constructor");
  }

  after() : call(* MethodInterception.finalize(..)) {
    System.out.println("destructor");
  }
}


> Hi Andre,
>
> > Is it posible to an aspect intercept itself? (nothing happ
ens)
>
> In the general case yes, and that often leads to infinite lo
ops if one is
> not careful. In this case Lendvai is correct and you'll need
 to extend the
> aspect first.
>
> -Macneil
>


---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br



Back to the top