Skip to main content

All Questions

2 votes
3 answers
102 views

Sub-Protected Method in java. (Can't think of a better way to phrase this) [duplicate]

How could I create a method in a given class that can only be called internally by it, and its subclasses. For example, the class Foo: public class Foo{ public Foo(){ } ???? void bar(){ ...
AlphaModder's user avatar
  • 3,356
35 votes
7 answers
32k views

Expose a private Objective-C method or property to subclasses

According to some official talk, a class in Objective-C should only expose public methods and properties in its header: @interface MyClass : NSObject @property (nonatomic, strong) MyPublicObject *...
hzxu's user avatar
  • 5,813