Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Question on privileged aspects

Using a privileged aspect should be the solution to this problem, but I see that you're already doing that.  'privileged' was one of the more difficult features to integrate smoothly with the eclipse compiler, so I wouldn't be surprised if we missed a case.  If you're seeing this in 1.1rc1 then please submit a small self-contained test case as a bug report to http://dev.eclipse.org/bugs (product AspectJ, component Compiler).

-Jim

> -----Original Message-----
> From: Mohamed Mansour [mailto:mansour@xxxxxxxxxxxxx]
> Sent: Sunday, March 23, 2003 6:00 PM
> To: aspectj-users
> Subject: [aspectj-users] Question on privileged aspects
> 
> 
> Hi,
> 
> I am writing an aspect with a pointcut before execution of a method in a
> non-public class in a different package.
> 
> My aspect is (./TraceAspect.java):
> 
> privileged aspect TraceAspect {
> before (edu.gatech.Argument t): execution (* *(edu.gatech.Argument)) &&
> args(t) {
>    // some code here
>  }
> }
> 
> My source code file is (./edu/gatech/Main.java):
> package edu.gatech;
> class Argument {
>  public int a;
>  public String b;
>  public SubArgument c;
> };
> 
> public class Main {
> }
> 
> When I compile with ajc 1.1 I get the following error message:
> 
> TraceAspect.java:15 The type edu.gatech.Argument is not visible for the
> argument t of the method ajc$before$TraceAspect$1b1
> before (edu.gatech.Argument t): execution (* *(edu.gatech.Argument)) &&
> args(t) {
>        ^^^^^^^^^^^^^^^^^^^
> 
> 1 error
> 
> Is this error message correct? How can I get access to the Argument
> class from my TraceAspect?
> 
> Thanks in advance for all the help.
> --
> Mohamed
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top