2009 Jun 05 10:54 AM
I am confused about a very basic thing.
Why must a constructor in an abstract class be public?
After all, it can only ever be called from the constructors
of the concrete subclasses, because of which I would
normally expect it to be protected.
-- Sebastian
2009 Jun 05 2:10 PM
Yes, it is confusing.
But till Release 7.0 EhP2, CONSTRUCTOR can only be declared as Public. From this release onwards, we can define the CONSTRUCTOR visibility also while defining the class. So, till this release all CONSTRUCTOR methods are public, no matter what type of class installation it is (i.e. Abstract or Private).
Check this link: http://help.sap.com/abapdocu/en/ABENNEWS-71-ABAP-OBJECTS.htm#!ABAP_MODIFICATION_1@1@
Regards,
Naimesh Patel
2009 Jun 05 2:10 PM
Yes, it is confusing.
But till Release 7.0 EhP2, CONSTRUCTOR can only be declared as Public. From this release onwards, we can define the CONSTRUCTOR visibility also while defining the class. So, till this release all CONSTRUCTOR methods are public, no matter what type of class installation it is (i.e. Abstract or Private).
Check this link: http://help.sap.com/abapdocu/en/ABENNEWS-71-ABAP-OBJECTS.htm#!ABAP_MODIFICATION_1@1@
Regards,
Naimesh Patel