Skip to main content

Blog Archive for monika_krug during January 2005

In my last blog entry I wrote about a substitute for a "protected-private" keyword that would allow inheritance, but not package access to the variable. I introduced around advice, binding variables to the target and arguments of a method call, and the keywords set(<i>VariablePattern</i>) and within(<i>ClassPattern</i>). Another feature that was requested in the Mustang...
One of the features requested in the J2SE 6.0 (Mustang) forum was a modifier that would allow a member variable to be inherited as if it were protected, but not to be accessed by the other classes from the package. This would be useful when a protected member variable must always be accessed by its getter and setter, because these have side-effects, and one wants to avoid accidentally accessing...