[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] staticinitialization of interface
|
Hi, Paulo.
> 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?
In my understanding <someStruncturalPointcut>(SomeType) matches SomeType and
SomeType *only*. This applies to interfaces as well as classes. SomeType+
makes all subtypes (being subinterfaces or subclasses, resp. classes
implementing SomeType) match.
A difference makes e.g. the call(...) pointcut, since it takes dynamic
dispatch and behavioural subtyping into account. So if you specify call(*
Object.equals(Object)), this will also match calls to equals(Object) on any
subtype of Object IIRC, since the method defined on the subtype is
essentially just a special implementation of the "contract" defined by the
interface of the equals(Object) method in Object. Sanme counts for
execution(...). However I am not sure about this/target/args...
Hope that helps,
Eric