The Java project I am working on currently has a complicated folder structure, and to add a new functionality, one needs to add many .java
files in different places in order to let it work in our project structure. For example, when I want to add a new object User
, I need to add Entity
, JsonModel
, Controller
, Listener
, Publisher
.., etc. It'd be easily missed if handled manually, so I'm looking for some way to automatically generate .java
files dedicated to one same object in different paths on demand.
For example, the programmer set the tool to generate .java
files about User
and it generates UserEntity
, UserInputModel
... into fit places, and then the programmer go write the actual code for those .java
files.
Is there a common way to handle this problem in Java? Maybe a famous tool, or some framework? I also ain't quite sure what's the keyword I should look for on this question. Code Generation
doesn't seem to mean the same, while Generate Classes
leads to the similar discussions. They're both more about automatically coding or transforming natural languages into actual codes. But here I just want to automate the .java
file creations, not the code in them.
I am not native English speaker, so I hope if you can, please also point me to the right word on this topic.