Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Annotation Type Pattern in aop.xml weaver includes

I think we have an existing bug for annotation inheritance and
pointcut matching - which may be affecting you.  But I am confused
that you are seeing it behave differently depending on whether your
within is expressed as part of the pointcut or in the aop.xml?  It
should work the same (either correctly or buggy) in either case.

AspectJ respects the rules that types never inherit annotations from
interfaces and only inherit them from superclasses if the annotations
are marked @Inherited.  I vaguely recall the bug was to do with
including + to cope with this and match types based on existence of an
annotation on their supertypes.

Andy.

On 05/12/2007, william.louth@xxxxxxxxxxxxx <william.louth@xxxxxxxxxxxxx> wrote:
> Hi,It would appear that the weaver "include within=" specification behaves
> different for annotation type patterns than within the pointcut
> specification.I cannot seem to instruct the weaver to include classes which
> have a @X annotation possibly derived from a parent class or implemented
> interface. The following for those classes tagged with @X.<weaver> <include
> within="@X *.*"/></weaver>but the following does not work for subclasses of
> annotated classes.<weaver> <include within="(@X *.*)+"/></weaver>I would
> have expected this to work very similar to the way interfaces are defined
> with the weaver section. The + notation does work for a point cut
> specification.
>
> Is this a bug? Is it meant to work? Any possible workarounds other than
> within="*".
> kind regards,William
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top