Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] declare parents with super/sub classes

No, I'm not using Java 5. I'm actually using what Java 1.3 since the
version of the system I'm using is 2 years old.

I previously had two aspects that I wove in a row, the first with the
supertype, the last with the subtype, which worked. But of course it's
not overly elegant to have however many of these compiled in a row (it
didn't work to include them in the same invocation of ajc) where the
aspect implements the same functionality so I was hoping there was a
better way but considering the use of the interface, I think that
there probably isn't :-)

Jennifer


On 4/11/06, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
> Are you using Java 5 by any chance? If you are and you are using an aspect
> to match the types that implement the interface, you might be able to use
> declare annotation to do what you want instead. However, it sounds like the
> JVM you are using is using interfaces like an annotation, where it doesn't
> "inherit" the effect of implementing one but requires the type to explicitly
> implement to get the desired effect.
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Jennifer Baldwin
> Sent: Tuesday, April 11, 2006 1:51 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] declare parents with super/sub classes
>
> P.S. And I know you're thinking, why on earth does she want to do the
> subclasses AND the superclasses? I'm wondering the same but the
> distributed JVM doesn't run if I don't. I've emailed the original
> developers to ask them what exactly is going on that it needs to be
> this way but I won't get an answer for about another 8 hours with the
> time zone difference :-)
>
> Jen
>
>
> On 4/11/06, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
> > Hi Jennifer,
> >
> > What happens if you use this idiom to make subclasses of SomeType
> implement
> > marker? I've used this before in cases where I didn't control SomeType but
> > wanted all subtypes to implement a marker...
> >
> > declare parents: (SomeType+ && !SomeType) implements Marker;
> >
> > -----Original Message-----
> > From: aspectj-users-bounces@xxxxxxxxxxx
> > [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Jennifer Baldwin
> > Sent: Tuesday, April 11, 2006 1:02 PM
> > To: aspectj-users@xxxxxxxxxxx
> > Subject: [aspectj-users] declare parents with super/sub classes
> >
> > Hi,
> >
> > I want to use declare parents to implement an empty interface for both
> > a subclass AND a super class. AJC will only do it for the superclass
> > in everything I've tried. I know that this makes sense since the
> > subclass will inherit the implementation. But for the example I'm
> > working on, which is implementing of distribution on a JVM, I need it
> > to be able to do this. Does anybody have any ideas on how to force it
> > to work?
> >
> > Thanks,
> > Jennifer
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top