[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-dev] RE: [aspectj-users] inter-type declaration conflicts with existing member
|
Title: Message
just a
follow up: i've commented out all errors about inter type decls
conflicting with existing members and the project compiles and works
fine.
101
hi,
i've just subscribed to the dev
list as this goes beyond the user list...
i think i've found the source
of the problem described below.
my theory: when compareMemberPrecedence is called
from compareToExistingMembers in
ResolvedTypeX.java, then it's called with bad parameters.
i've put the following two lines into
compareMemberPrecedence:
ResolvedTypeX t1 =
m1.getDeclaringType().resolve(world);
ResolvedTypeX t2 =
m2.getDeclaringType().resolve(world);
System.out.println("Resolved\nt1 [" + t1 + "]\nt2 ["
+ t2 + "]");
and the output
is:
[iajc]
Resolved
[iajc] t1
[com.netvisor.web_framework.components.ScreenMixin$Screen]
[iajc] t2
[com.netvisor.nvsr.web.bdl.BDLEntityScreenBase]
[iajc]
D:\work\granite\Repository\web-framework\src\java\com\netvisor\web_framework\components\ScreenMixin.java:38
inter-type declaration from com.netvisor.web_framework.components.ScreenMixin
conflicts with existing member: void
com.netvisor.web_framework.components.ComponentGridScreen.removeContent()
as you can
see t1 is the interface of the mixin, instead of the actual class on
which the aspect is currently applied (it's an interface-based mutilple
inter-type declaration). because of
this compareMemberPrecedence returns 0 which causes
compareToExistingMembers to rise the mentioned
error.
unfortunately this problem is beyond my
knowledge right now.
does this make sense? is there an easy way to fix
this problem? (read: can it be in cvs by tomorrow :)
currently i can't build my project, not to mention that
when it builds it doesn't work... :(
if there's a solution i can do, let me know! but i've
spent 30 minutes with aspectj sources, so don't expect too much.
happy coding, hope it helps
- 101
:: hi,
::
:: i get this error, but only if i compile
my web framework and
:: a project using it together. (as opposed to build
a
:: standalone framework jar and use it with aspectpath to build
:: the
project)
::
:: but the qustion is this:
::
:: class X
::
{
:: }
::
:: class Y extends X
:: {
::
void init()
:: {
::
super.init();
::
}
:: }
::
:: aspect A
:: {
::
interface I {};
::
::
declare parents: X implements I;
::
:: public
void I.init()
:: {
::
}
:: }
::
:: i inject a declaration into X and then try to override
it in
:: Y. if i have X in the seperately compiled framework jar,
::
then it works as expected. but if i compile all sources in
:: one phase
then i get the conflict error.
::
:: imho, it would be enough to stop
with error if X had a "void
:: init()", and optionally issue a warning if
any subclass of X
:: has a "void init()".
::
:: is there an agreement
about this issue?
::
:: also is it possible to compile this setup in one
phase at all?
::
:: thanks,
::
:: - 101
::
::
_______________________________________________
:: aspectj-users mailing
list
:: aspectj-users@xxxxxxxxxxx
:: http://dev.eclipse.org/mailman/listinfo/aspectj-users
::
::