Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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




Back to the top