This may be useful for library developers to restrict something or rearrange the APIs.
It may be implemented as following:
enum class VisibilityLevel {
Public,
Internal,
} // no reasons to make it private or protected
@GenSealedEnum( // the actual usage
extensionsVisibility = VisibilityLevel.Internal,
objectVisibility = VisibilityLevel.Internal, // it's important to have separate visibility settings for extensions vs objects
)
The functionality may be used by library developers to hide some of the methods, or to implement it as actual fields and not as extensions.