This is compiler bug, which I have now reported. It appears to occur only
when you have types in different packages and are passing an argument with a
type conversion. Fortunately, I found that you can workaround it using
this.returnNothing() in your inter-type declaration. I have reported it as
a bug (#67578 - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67578)
I also found a closely related bug that crashes the compiler (bug
#67579).
------------Original Message------------
From: Irum Godil <softwarengineer2003@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Wed, Jun-16-2004 7:30 PM
Subject: [aspectj-users] Error in accessing private methods from a
"privileged" aspect
Hi,
I am seeing a strange scenario and I will really appreciate your help in
the matter. Basically, I have an aspect and a class. The class has a private
method and I want to access that method in the aspect. I have imported the
class' package and I declare my aspect to be "privileged" as well. But I keep
getting the error:
Error The method returnNothing(Object) from the
type A is not visible B.java Test/b
Following is the code for it:
package
a;
public class A {
private
void
returnNothing(Object a) {
}
}
package
b;
import
a.*;
privileged
aspect B {
public
void A.newFun()
{
returnNothing(
new String("a"));
}
}
I am not sure why is it not visible when I have declared my package to be
privileged and also imported the package. Any help will be appreciated.
Thanks.
Do you Yahoo!?
Read only the mail you want - Yahoo!
Mail SpamGuard.