Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Another intertype declaration question

But according to the programming guide,
One declaration can introduce several elements in several classes as well.
For example,

  public String (Point || Line || Square).getName()  { return name; }

Does this mean something else? Thanks.

Charles

On Wed, 4 Feb 2004, Ramnivas Laddad wrote:

> No, it won't work. You need to try something like the following:
>
> interface Cl {
> }
>
> declare parents: (Cla || Cla2) implements Cl;
>
> int Cl.print(){
>     throw new RuntimeException();
> }
>
> -Ramnivas
>
> --- Charles Zhang <czhang@xxxxxxxxxxxxxxxx> wrote:
> > Does this work?
> > int (Cla || Cla2).print(){
> > 	throw new RuntimeException();
> > }
> > I have two dummy classes, Cla and Cla2. Compiler says
> > /home/czhang/eclipse/workspace/Test/Test.java:16 Syntax error on
> > token
> > "(", "around", "aspect", "privileged", "pointcut", "before", "after",
> > "declare", "Identifier" expected
> > int (Cla || Cla2).print()
> >     ^
> >
> > Charles
>
>
> =====
> Ramnivas Laddad,
> Author, AspectJ in Action
> http://www.manning.com/laddad
> http://www.amazon.com/exec/obidos/ASIN/1930110936
>
> Check out my aspect-oriented refactoring articles:
> http://tinyurl.com/yqm96
> http://tinyurl.com/288nn
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top