- | The originally '''protected abstract''' methods are moved to ''Provider'' interface. Interface methods are '''public''' and this might seem like a contradiction to [[ClarityOfAccessModifiers]]. However, it is not. The instances of ''Provider'' interface are not accessible to [[ClientAPI|clients]] of the [[API]]. They are hidden and only useful for the ''create'' factory method that turns them into ''NonMixed'' instances. As such they are ''single meaning'' methods with only one message: ''implement me, don't call me!''. Their [[clarity]] is kept. | + | The originally '''protected abstract''' methods are moved to ''Provider'' interface. Interface methods are '''public''' and this might seem like a contradiction to [[ClarityOfAccessModifiers]]. However, it is not. The instances of ''Provider'' interface are not accessible to [[ClientAPI|clients]] of the [[API]]. They are hidden and only useful for the ''create'' factory method that turns them into ''NonMixed'' instances. As such they are ''single meaning'' methods in an [[ImplementOnlyInterface]] with only one message: ''implement me, don't call me!''. Their [[clarity]] is kept. |
| There is also the ''Callback'' class which holds originally '''protected final''' methods. It is a final class, with non-public constructor, so its creation is fully under the control of the ''NonMixed'' [[API]] infrastructure. Clients of the ''NonMixed'' class cannot get access to it - the reference is only available to the ''Provider'' interface via the ''initialize'' method. As such its use is ''protected'', only ''Provider'' interface implementor can call its methods. Moreover the class is final and as such its methods have only single meaning: ''call me, if you are implementing the provider''. Fully [[Clarity|clear]] again. | | There is also the ''Callback'' class which holds originally '''protected final''' methods. It is a final class, with non-public constructor, so its creation is fully under the control of the ''NonMixed'' [[API]] infrastructure. Clients of the ''NonMixed'' class cannot get access to it - the reference is only available to the ''Provider'' interface via the ''initialize'' method. As such its use is ''protected'', only ''Provider'' interface implementor can call its methods. Moreover the class is final and as such its methods have only single meaning: ''call me, if you are implementing the provider''. Fully [[Clarity|clear]] again. |