Hi,
It should always do the right thing - if Aspect1 makes an ITD that Aspect2
affects, it will work fine. If Aspect2 makes an ITD that Aspect1 advises,
it will work fine. Something like this:
aspect A {
declare parents: C implements SomeInterface;
}
aspect B {
public void SomeInterface.foo() {}
}
will always work whichever way round the aspects are applied - C will get
method foo().
Andy.
On 26 Feb 2008 23:10:14 -0000, vinodh subbiah <[EMAIL PROTECTED]>
wrote:
>
> Hi,
> Ok I think set precedence of order of weaving but unless the .java file
> got the code it may not be applicable to the generated byte code by the
> first aspect.
> But is there a way i can weave to a java class though Aspect1 and then
> weave Aspect2 based on the changes / introduction made by aspect1.
>
> Thanks,
> Vinodh
>
>
>
> On Tue, 26 Feb 2008 vinodh subbiah wrote :
>
> >Hi All,
> > Im having 2 aspects and I want to set a precedence between them
> >
> >I have a java class Foo
> >I have a aspect FooAspect ( have method m1() declared on class Foo
> >I have a logger aspect LogAspect
> >
> >Now if i try setting the precedence Im not able to see any logging on
> method m1 when it is called.
> >
> >Is there any way i can set this ..
> >
> >Thanks
> >Vinodh
> >
> >Below is some of the code i got from .class file generated.
> >
> >Here showConditons which declared on Class has the tracing ,but I
> >addingObject(..) methods which are added using the Aspect into the class
> are not surronded with the Trace .
> >So Im not able to see the trace if any.
> >Any help appreaciated.
> >
> >Thanks again :)
> >
> >I set the precedence in another aspect like
> >declare precedence : CEAspect,TraceAspect ;
> >So i first add the methods to the Class FOO and then surrond it with
> trace.
> >
> >
> >Showing the crosscuting with TraceAspect
> > public void showConditions()
> > {
> > TraceAspect.aspectOf
> ().ajc$before$com.xuaspect_TraceAspect$1$b314f86e(ajc$tjp_1);
> > printConditions();
> > TraceAspect.aspectOf
> ().ajc$afterReturning$com.xuaspect_TraceAspect$2$b314f86e(ajc$tjp_1);
> > }
> >
> >Only method injected no trace aspect added
> >
> > public void addingObject(IlrAlphaMem ilralphamem, Object obj)
> > {
> >
> CEAspect.ajc$interMethod$com.xuaspect_CEAspect$com.xuaspect_CEvents$addingObject(this,
> ilralphamem, obj);
> > }
> >
> > public void addingObject(IlrDefaultDiscMem ilrdefaultdiscmem, Object
> obj)
> > {
> >
> CEAspect.ajc$interMethod$com.xuaspect_CEAspect$com.xuaspect_CEvents$addingObject(this,
> ilrdefaultdiscmem, obj);
> > }
> >
> > public void addingObject(IlrDefaultJoinMem ilrdefaultjoinmem, Object
> obj)
> > {
> >
> CEAspect.ajc$interMethod$com.xuaspect_CEAspect$com.xuaspect_CEvents$addingObject(this,
> ilrdefaultjoinmem, obj);
> > }
> >
> >Vinodh Subbiah,
> >580 Laforet Street,Apt 14
> >Windsor N9C3G8
> >Canada
> >Ph 519-971-7847
> >_______________________________________________
> >aspectj-users mailing list
> >[email protected]
> >https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
> Vinodh Subbiah,
> 580 Laforet Street,Apt 14
> Windsor N9C3G8
> Canada
> Ph 519-971-7847
>
> [image: Times Better
> Job]<http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff.com/signature-home.htm/[EMAIL
> PROTECTED]/2030902_2023692/2038716/1?PARTNER=3&OAS_QUERY=null>
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users