Skip to content

Add support of different levels of visibility for generated code #113

@bvitaliyg

Description

@bvitaliyg

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions