Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Another problem with static crosscutting...
Another problem with static crosscutting... [message #54762] Sun, 10 July 2005 22:03 Go to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
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 22:24 Go to previous message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
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 22:24 Go to previous message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
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
>
Previous Topic:Another problem with static crosscutting...
Next Topic:don't understand serialVersionUID related warning
Goto Forum:
  


Current Time: Tue Apr 16 20:49:57 GMT 2024

Powered by FUDForum. Page generated in 1.72229 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top