Function to create safe java class ids #276
Labels
Component: code base
The code quality of the project (does not affect functionality)
Component: code generation
Something that concerns the generated code
Priority: low
Status: proposal
Enhancement in the proposal stage
Type: bug
Something isn't working
Type: enhancement
New feature or request
Summary
Create a function that correctly generates safe java class ids and use it everywhere.
Todo
_
and-
to find some uses)Reason
Currently does not handle keywords, and much of the logic for escaping dashes and keywords is duplicated across multiple places.
Implementation
There is already a strategy
pie-sanitize-class-id
, but it is not used everywhere, and only handles dashes. To handle keywords, it could add specific rules that provide specific outputs, e.g.pie-sanitize-class-id: "super" -> "$super"
(note: check if this works with strings with annotations).To handle type arguments, it could additionally take a list of type arguments and stringify them too.
Related issues
None
The text was updated successfully, but these errors were encountered: