Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] FW: Multiple 'functional' inheritance

You can't use declare parents to break the rules of Java.  In java one
class can extend one other class, it can't extend multiple classes. 
Do you really get a verify error if you attempt to put make multiple
classes the parent of some target type?  If you do, that's a bug and
we should be reporting earlier that it's not allowed.  What you *can*
do is have a class implement multiple interfaces and with method ITDs
on those interfaces, the target type will pick up the ITD
implementations.

Andy.

On 17/11/05, Tom Lambrechts <tom_lambrechts@xxxxxxxxxx> wrote:
>
>
>
> Hi,
>
>         Why can't I do multiple functional inheritance in my aspects. I
> would like to add several aspects to my target who all add a functional java
> class. Now I add my functional class by "declare parents: (MyTarget) extends
> MyFunctionalClass;". But I get a verify error when adding more than one
> aspect with this statement. (Because only single enheritance is allowed.)
>
>         Is there an other way to add more than one 'java' type to a target?
>
> Thanks,
>
> Tom
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>


Back to the top