Is there a way to limit access to a super classes' public methods?
say I have three classes all derived from a JPanel.
I have some functions in UglyMap, that I want FriendlyMap to use
but I don't want the UserMap to use. Is there a way I can say
that FriendlyMap can use UglyMap.clear(), but stop UserMap
from calling UglyMap.clear()?
Protected doesn't work.
I figured out a way that might work but is messy ( does
declaring 'private FriendlyMap.clear()' work?). This is
messy because UglyMap has about 300 methods in it.
if java had something like c++ friends ( an ugly hack, I
admit), it might help.
Is there another way to do this?