Bug 288713 - @DeclareParents/@DeclareMixins defaultImpl needs +
Summary: @DeclareParents/@DeclareMixins defaultImpl needs +
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.5   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-06 13:41 EDT by arlindolima CLA
Modified: 2009-09-06 19:50 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).