Another problem with static crosscutting... [message #54762] |
Sun, 10 July 2005 18:03  |
Eclipse User |
|
|
|
The aspects and most of my code now compiles fine, but I just ran into
another problem with my cross-cutting aspect:
Two classes that are aspectized/aspectified/adviced/cross-cut(?) by my
advice now show the following error:
Severity Description Resource In Folder Location Creation Time
2 Implicit super constructor <foo>() is not visible. Must explicitly
invoke another constructor <bar>.java <package> line 126 July 10, 2005
11:37:04 PM
<foo> and <bar> indeed are in two different packages, i.e. abstracted my
aspect reads:
------------------------
package x.y.z;
import a.b.<foo>; // foo is an interface
import c.d.<bar>; // bar is an interface
public aspect XYZ implements <bar> {
declare parent: <foo> implements XYZ; // I also tried "extends" - no
difference
(... adding the methods required for <bar> here...)
}
------------------------
I also tried adding a public parameterless constructor to the aspect,
again no difference.
How can I tell the weaved-in code where to find <bar> other then via the
declare ... statement???
Very puzzled,
Michael
|
|
|
Re: Another problem with static crosscutting... [message #54790 is a reply to message #54762] |
Sun, 10 July 2005 18:24  |
Eclipse User |
|
|
|
OK - I found the reason: I had actually cheated (i.e. simplified things)
a bit: in reality XYZ actually extends an abstract aspect UVW, i.e. in
its full beauty this now reads:
abstract aspect UVW implements <bar> {
(... defines an abstract pointcut ...)
(... adding the methods required for <bar> here...)
}
public aspect XYZ extends UVW {
declare parent: <foo> implements UVW;
(...defines a concrete pointcut...))
}
i.e. I actually needed to declare <foo> to implements or extend the
abstract aspect UVW, not the derived aspect XYZ and now things compiles
fine.
Pretty tricky stuff this AspectJ! Guess I'm dancing on a high rope
here...
Michael
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:das5vu$6uh$1@news.eclipse.org...
> The aspects and most of my code now compiles fine, but I just ran into
> another problem with my cross-cutting aspect:
>
> Two classes that are aspectized/aspectified/adviced/cross-cut(?) by my
> advice now show the following error:
>
> Severity Description Resource In Folder Location Creation Time
> 2 Implicit super constructor <foo>() is not visible. Must explicitly
> invoke another constructor <bar>.java <package> line 126 July 10, 2005
> 11:37:04 PM
>
> <foo> and <bar> indeed are in two different packages, i.e. abstracted
> my aspect reads:
>
> ------------------------
> package x.y.z;
>
> import a.b.<foo>; // foo is an interface
> import c.d.<bar>; // bar is an interface
>
> public aspect XYZ implements <bar> {
> declare parent: <foo> implements XYZ; // I also tried "extends" -
> no difference
>
> (... adding the methods required for <bar> here...)
> }
> ------------------------
>
> I also tried adding a public parameterless constructor to the aspect,
> again no difference.
>
> How can I tell the weaved-in code where to find <bar> other then via
> the declare ... statement???
>
> Very puzzled,
> Michael
>
|
|
|
Re: Another problem with static crosscutting... [message #589340 is a reply to message #54762] |
Sun, 10 July 2005 18:24  |
Eclipse User |
|
|
|
OK - I found the reason: I had actually cheated (i.e. simplified things)
a bit: in reality XYZ actually extends an abstract aspect UVW, i.e. in
its full beauty this now reads:
abstract aspect UVW implements <bar> {
(... defines an abstract pointcut ...)
(... adding the methods required for <bar> here...)
}
public aspect XYZ extends UVW {
declare parent: <foo> implements UVW;
(...defines a concrete pointcut...))
}
i.e. I actually needed to declare <foo> to implements or extend the
abstract aspect UVW, not the derived aspect XYZ and now things compiles
fine.
Pretty tricky stuff this AspectJ! Guess I'm dancing on a high rope
here...
Michael
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:das5vu$6uh$1@news.eclipse.org...
> The aspects and most of my code now compiles fine, but I just ran into
> another problem with my cross-cutting aspect:
>
> Two classes that are aspectized/aspectified/adviced/cross-cut(?) by my
> advice now show the following error:
>
> Severity Description Resource In Folder Location Creation Time
> 2 Implicit super constructor <foo>() is not visible. Must explicitly
> invoke another constructor <bar>.java <package> line 126 July 10, 2005
> 11:37:04 PM
>
> <foo> and <bar> indeed are in two different packages, i.e. abstracted
> my aspect reads:
>
> ------------------------
> package x.y.z;
>
> import a.b.<foo>; // foo is an interface
> import c.d.<bar>; // bar is an interface
>
> public aspect XYZ implements <bar> {
> declare parent: <foo> implements XYZ; // I also tried "extends" -
> no difference
>
> (... adding the methods required for <bar> here...)
> }
> ------------------------
>
> I also tried adding a public parameterless constructor to the aspect,
> again no difference.
>
> How can I tell the weaved-in code where to find <bar> other then via
> the declare ... statement???
>
> Very puzzled,
> Michael
>
|
|
|
Powered by
FUDForum. Page generated in 0.02939 seconds