Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AW: Pointcut on a constructorwithacustom@Annotation

>Annotations are inherited if you put @Inherited on them.
>Making the annotation inherited ensures @target matches:

So @target(Annotation) matches if and only if
thisJoinPoint.getTarget().getClass() has the annotation. The guide says
"where the object bound to this (or target, respectively) has an annotation
of the specified type" 

However, it wasn't obvious to me from reading this text that it refers only
to the most-derived class ... since annotations aren't inherited by default,
I think it's not right to refer to an object as having an annotation: only
types do, and the object may belong to several types only some of which have
the annotation...

>Also Ramnivas raised a bug a while ago on some problems with '+' when
>annotations are in the mix:
>https://bugs.eclipse.org/bugs/show_bug.cgi?id=128664

Sounds like I rediscovered this.



Back to the top