[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] oops! complete email on initialising instance variables
|
Hi Aaron -
Whoops! Your code is not in a constructor or initializer:
> public aspect B extends A
> {
> foo = 5;
A Java compiler would complain as well.
You can write a default, no-arg constructor:
public aspect B extends A {
B() {
foo = 5;
}
}
Wes
Aaron Blishen wrote:
Hi All,
I am having problems initialising inherited instance
variables. Since the aspects do not have
constructors, how do we intialise inherited instance
variables? i.e:
public abstract aspect A
{
protected int foo;
}
public aspect B extends A
{
foo = 5;
}
Compiler complains: Syntax error on token "=",
"around", "aspect", "privileged", "pointcut",
"before", "after", "declare", "Identifier" expected
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users