[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How do we declare multilple class in @DeclareParents ?

Hello Andrew and  Andy,

Thank you for your answer - We use the version 1.6.12 with RAD 8.0.0.4 which runs  3.6 Eclipse - We have no choice and we cannot update RAD. Then we have to wait for IBM to produce an update for RAD.

We discovered also some strange behavior which are not present in the native language AspectJ, I mean without using annotation.

1)  When we have a final class, the AJ Editor is not able to show the impact of the aspect inside the class.
      When we remove the keyword "final", AJ Editor is able to show the impact of the aspect inside the class (cross reference view)

2) Moreover when we have a final class or even if we remove the keyword final, the aspect is not performed and placing a breakpoint inside the class,
    the break point stops at the line 1 of the class impacted by the aspect.

I'm going to test if I can reproduce this behavior and I will propably post a bug report. It is not only a problem of AJ Editor but also with the compiler as the aspect is not performed but the class where the function is,  is...

So, thank you very much for your answers. I appreciate the quick and valuable feedback.

Regards,

J.





De :        Andrew Eisenberg <andrew@xxxxxxxxxxxx>
A :        aspectj-users@xxxxxxxxxxx
Date :        2012-05-02 22:56
Objet :        Re: [aspectj-users] How do we declare multilple class in @DeclareParents ?
Envoyé par :        aspectj-users-bounces@xxxxxxxxxxx




Chiming in a bit late here, but there's something I want to point out.
The fix to the bug that Andy is talking about is only available in
the 2.2.0 dev builds.  These builds are only available for Eclipse 3.7
and 4.2.  They will not install into Eclipse 3.6.  Your RAD is based
off of 3.6, so you will not be able to get the fix unless you can
somehow use a 3.7 based RAD.

On Wed, May 2, 2012 at 12:30 PM, Jean Andre <Jean.Andre@xxxxxxxxxx> wrote:
> I'm using AJDT  Eclipse 3.6 as we use RAD 8.0.0.4 from IBM.
>
> From :
http://www.eclipse.org/ajdt/whatsnew213/ -
>
http://download.eclipse.org/tools/ajdt/36/update
>
>  - org.eclipse.ajdt_2.1.3.e36x-20110622-1300.jar
>  - org.eclipse.contribution.weaving_2.1.3.e36x-20110622-1300.jar
>  - /org.eclipse.equinox.weaving.sdk_1.0.0.v20090817.jar
>
>
>
>
>
>
> De :        Andy Clement <andrew.clement@xxxxxxxxx>
> A :        aspectj-users@xxxxxxxxxxx
> Date :        2012-05-02 13:44
> Objet :        Re: [aspectj-users] How do we declare multilple class in
> @DeclareParents ?
> Envoyé par :        aspectj-users-bounces@xxxxxxxxxxx
> ________________________________
>
>
>
> Hi,
>
> What version of AspectJ are you using?
>
> I just tried this (basically the same as yours) on 1.7.0 dev builds
> and it was OK:
>
>
> ===== 8<==== Code2.java ===
> package com;
> import org.aspectj.lang.annotation.*;
>
>
> class B {}
> class C {}
>
> @Aspect
> class MoodIndicator {
>  interface Moody {
>    String getMood();
>  };
>
>  static class MoodyImpl implements Moody {
>    public String getMood() { return "happy"; }
>  }
>
>  @DeclareParents(value="com.B || com.C", defaultImpl = MoodyImpl.class)
>  private Moody implementedInterface;
> }
> ===== 8<==== Code2.java ===
> ajc -1.5 Code2.java -showWeaveInfo
> Extending interface set for type 'com.B' (Code2.java) to include
> 'com.MoodIndicator$Moody' (Code2.java)
>
> Type 'com.B' (Code2.java) has intertyped method from
> 'com.MoodIndicator' (Code2.java:'java.lang.String
> com.MoodIndicator$Moody.getMood()')
>
> Extending interface set for type 'com.C' (Code2.java) to include
> 'com.MoodIndicator$Moody' (Code2.java)
>
> Type 'com.C' (Code2.java) has intertyped method from
> 'com.MoodIndicator' (Code2.java:'java.lang.String
> com.MoodIndicator$Moody.getMood()')
>
> I got exceptions (unexpected) when using it on 1.6.12/1.7.0.M1.
>
> Are you getting exceptions or is it just not working?
>
> cheers,
> Andy
>
> On 2 May 2012 06:22, Jean Andre <Jean.Andre@xxxxxxxxxx> wrote:
>> How do we declare multilple class in @DeclareParents ?
>>
>> This syntaxe does not work :  @DeclareParents(value="com.c1 ||
>> com.c2",defaultImpl=Implclass.class)
>>
>> Thank you
>>
>>
>> _______________________________________________
>> 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