Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Cannot access private field/method declared via ITD from target class

Hi Andy.

I might remember wrong, but I think this used to work at some point in
the past, or at least it should. But before I file a Bugzilla ticket, I
would like to have your opinion, Andy. Declaring something like

private int MyClass.myField = 0;

private int Account.getMyField() {
  return myField;
}

basically works and the aspect itself can access the field and the
method. But the class they are declared on cannot and Ajc says:

[error] The method getMyField() from the type MyClass is not visible

For a full MCVE which you can just copy & paste and for my other
findings, please see my answer here:

https://stackoverflow.com/a/61450184/1082681

Kind regards
-- 
Alexander Kriegisch
https://scrum-master.de


Back to the top