I want something similar to protected, where only a class which implements the protected field and anything that subclasses it can access it.
So, I want to be able to declare a variable in the base class as private, but still be able to access it from a subclass.
Perhaps this is against the very nature of subclassing, private, and/or protected.
Does something like this exist in Java?
There are only four access levels for fields in Java:
privateprotectedpublicprotectedwill allow subclasses, other classes in the same package, and members in the class itself to access theprotectedmember.The short answer is, there is no way to achieve exactly what is desired.
For a description of those four access modifiers, Controlling Access to Members of a Class from The Java Tutorials has more specific information.