Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] The constructor DeprecatedMethodLogger() is not visible when testing my aspect

Hi,


I am using aspectj 1.8.10 and we experience the following Eclipse:


In my test I have:


public class DeprecatedMethodLoggerTest {

    private boolean debug = true;
    private DeprecatedMethodLogger deprecatedMethodLogger;

    @Before
    public void setup() {
        deprecatedMethodLogger = new DeprecatedMethodLogger();
    }

}


My aspect looks something along the lines:


aspect DeprecatedMethodLogger {
      
    //Instantiated once so we can get information here that only needs to be fetched once.
    public DeprecatedMethodLogger() {
        addLifeHandling();

    }

}

Both classes are in the same package.

Then Eclipse 4.6.3 complains about the following:

The constructor DeprecatedMethodLogger() is not visible DeprecatedMethodLoggerTest.java 

What could be the reasons for this error message? Does the aspect have to be public?

Any hints?

br,

//mike


 

 


Back to the top