Refactored check for a class's actual modifier as private or protected visibility for inner classes is only possible for inner classes.