Skip to Content
0
Oct 30, 2015 at 08:40 AM

Global singleton class - public or protected/private instance generation?

376 Views

Hello colleagues,

Recently, in abapdocu I read a guideline that describes a rule: "Declare the instance constructor in the public visibility section." with an exсeption: "The technical restrictions mentioned only apply to the processing of global classes.".

Okay, clear. But what about global singleton classes? Should we also use public section for constructors of such classes? I thought that protected or private instance generation should be defined for this pattern 😕.

Thanks,

Ilya