Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] 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
>
>


Back to the top