Closed
Description
Adding insertion points in various field modifier could help extending generated classes with additional logic in those.
I think about implementing nullable support by using these insertion points the following way:
I will create a protobuf plugin that does the following:
- when a specific option is present on a message (say 'allowNullableFields') then the plugin looks for a map[int]->bool map.
- If the map exists then insert code that set value to true for the corresponding field ID in the map in various setters scopes.
- If the map does not exists then the protobuf plugin fail compiling the corresponding schema.
- Also the plugin will generate a hasXXX method for each of the field that will simply look for the field id in the map an return true if the corresponding value is set to true.
Sounds like a less intrusive approach to solve issue #1606 but still requires additional insertion points.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Add insertion points for field modifiers
Add insertion points for field modifiers
Add insertion points for field modifiers
Add insertion points for field modifiers
Add Java insertion points for field modifiers
Add C# setters insertion points for field modifiers
15 remaining items