Reputation: 53
All of my domain objects follow a very similar structure, if I wanted to store Address objects in my application, I would create in a .address package an Address, IAddressService, AddressServiceImpl, as well as an AddressServiceImplTest in a corresponding test package. All of these objects seem like they could be easily templated, however I usually find myself just copying a similar domain object and renaming classes manually.
Is there a template method in eclipse, or a plugin, that could autogenerate several classes and several packages in one shot for this type of scenario?
Upvotes: 0
Views: 41
Reputation: 431
I am not aware of a prebuilt solution. However, you can consider writing your own, specialized template engine using Java Emitter Templates.
Upvotes: 1