[Task] Allow customizing the class name when generating POJOs from aspect models #538
Labels
acknowledged
Has been viewed by one of the maintainers and is ready for further work, discussion or other steps.
task
Currently the name that is used when generating POJOs from aspect models is fixed to the element name.
It would be great to have more control over the name, especially to allow custom prefixes.
The background for this is the following: it is quite common for projects that use generated POJOs to have the generated layer as some kind of base and then use derived classes where appropriate, that are the actual POJOs used to implemented against:
This setup allows extended or otherwise customized functionality on POJOs to be provided through the derived classes (in this example within
Movement.java
).To be clear, this setup of course is already possible to be implemented with the current state, however a somewhat weird naming scheme would be required to do so, as the parent classes would carry the idiomatic name and the derived classes would need some pre- or postfix.
Describe the solution you'd like
A minimum solution would allow to add a prefix on demand, an ideal solution would allow to fully plug in a function that generates the final name to be used for the class (with the default behaving as it is right now).
Also, the solution should (at least in the most fine-grained configurable variant) allow to perform this customizing on a per-model base, so that it is possible to selectively apply a customized name. This would allow the above described implementation structure to be applied to just a bunch of models, while keeping the default for all the others, because no customized implementation layer is required for these.
The text was updated successfully, but these errors were encountered: