Bug 288713

Summary: @DeclareParents/@DeclareMixins defaultImpl needs +
Product: [Tools] AspectJ Reporter: arlindolima
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: aclement, arlindolima
Version: 1.6.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description arlindolima CLA 2009-09-06 13:41:28 EDT
With the current @DeclareParents/@DeclareMixins implementations, if I have a class Apple that implements the interface Food and I declare a method for interface Food, as well as an implementation, if I want the class Apple to share that implementation, I'll have to use the plus sign (+):

@DeclareParents(value="Food+", defaultImpl=FoodImpl.class)
and
@DeclareMixin("Food+")

Is this the intended bahaviour (code style is different)?

I was recommend to raise a bug for this, so the AJ team can think about whether or not it makes sense to change the behaviour.
Comment 1 Andrew Clement CLA 2009-09-06 19:50:28 EDT
Does seem a little odd that the + is required in this scenario.  Apple should be considered the 'top most' implementor of the interface and get the method implementations (if it doesn't already provide them).