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