[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] declare question
|
>> You *might* get a eager parsing bug in the eclipse editor as it
isnt aware the aspect will make everything alright at compile time?
I have seen the type cast error happen to me a couple of times before,
I never verified if it was due to the eager parsing by the editor the
typecast seemed to make sense to me and I put it in there.
On Dec 13, 2007 4:06 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> I'm not quite sure what you are doing, but that program compiles fine for me:
>
> ---- Client.java ---- 8<----
> interface Ola {}
>
> public class Client {
> Client(){};
>
> public int num1(){
> return 1;
> }
>
> public void aux()
> {
> Ola o = new Client();
> }
> }
>
> aspect example{
>
>
> declare parents: Client implements Ola;
>
> }
> ---- Client.java ---- 8<----
>
> C:\aspectj1.5-dev>ajc -showWeaveInfo Client.java
> Extending interface set for type 'Client' (Client.java) to include
> 'Ola' (Client.java)
>
> Are you compiling all from source? are you binary weaving in some way?
> it should be fine. You *might* get a eager parsing bug in the eclipse
> editor as it isnt aware the aspect will make everything alright at
> compile time?
>
> Andy.
>
>
> On 13/12/2007, Renato Rodrigues <renatolmsrodrigues@xxxxxxxxx> wrote:
> > Im a newbie to AspectJ and i'm trying to do a simple declare parents
> > expression so a Class can implement an interface
> >
> > i have class:
> >
> >
> > public class Client {
> > Client(){};
> >
> > public int num1(){
> > return 1;
> > }
> >
> > public void aux()
> > {
> > Ola o = new Client();
> > }
> > }
> > and aspect :
> >
> >
> > public aspect example{
> >
> >
> > declare parents: Client implements Ola;
> >
> > }
> >
> >
> > and the compiler says Type mismatch: cannot convert from Client to Ola
> >
>
> > _______________________________________________
> > 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
>