logo       

Re: declare question: msg#01311

Subject: Re: declare question
Hmmm, I'd try

    public void aux()
    {
        Ola o = (Ola) new Client();
    }

On Dec 13, 2007 2:29 PM, 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
>
>


<Prev in Thread] Current Thread [Next in Thread>