The reasoning is inheritance. Since a component implementation class can extend some other class, we wanted DS to only call methods which would be callable by the implementation class declared in the component description. If we allowed DS to call private methods, then this breaks the visibility of the class hierarchy. It would allow someone to extend some class and have DS call its private methods. --
BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [EMAIL PROTECTED] office: +1 386 848 1781 mobile: +1 386 848 3788 From: "Fredrik Alströmer" <[EMAIL PROTECTED]> To: "OSGi Developer Mail List" <[email protected]> Date: 2008/12/03 04:33 Subject: [osgi-dev] DS / method visibility...? Sent by: [EMAIL PROTECTED] Hi, perhaps this question has been asked many times before, but here goes anyway: What's the rationale behind the fact that all methods that should be called by DS should be public or protected? Why is it not 'not private' (i.e. including default)? Thanks, Fredrik. _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
