Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] staticinitialization of interface

What happens if I specify an interface or aspect in the type signature of a staticinitialization pointcut?
For example,
   before() : staticinitialization(MyInterface)  {
       System.out.println(thisJoinPoint.toLongString());
   }
Is the woven advice executed when I instantiate any class that implements MyInterface? My tests (in Eclipse 3.0.1, AJDT 1.2.0M2) indicate the answer is *no* when I specify MyInterface in the type signature and *yes* when I specify MyInterface+. I hope someone knowledgeable in the AspectJ semantics can shed some light.

Follow-up question: in general, does the type signature MyInterface+ map to that interface and all subinterfaces *and* all classes that implement that interface or any subinterface? If so, shouldn't the type signature MyInterface (without '+') map to that inferface and all classes that implement that interface?

Thanks,
Paulo Merson




Back to the top