two new access modifiers
Java needs two new access modifiers.
1. For methods and fields, a modifier that means "accessible by subclasses only".
As it stands, I am forced to use "protected" to indicate this, but that leaves the method vulnerable to abuse from other classes in the same package.
2. For classes, a modifier that means "visible to classes on the same level or deeper in the package hierarchy"
For example, given the following packages:
Such a class in package foo.bar would be visible in all these packages. One in foo.bar.xxx would be visible in the bottom 3.
Once again, as it stands I am forced to make classes public if I want to share them between these packages, leaving them open to abuse from the whole wide world.
I think the keyword "protected" might be reused for number (2), and maybe we could truly confuse the issue and pirate "internal" from C# for number (1).