I use the template quite a lot:
class Blah int a; double b; String c; Date d; public Blah(int a, double b, String c, Date d) { super();
These are really many templates for something so simple. I was thinking of a universal factory object to do this with introspection, but it seems very evil (special cases, inheritance, and speed issues). You can use Guice, and the constructor generally skipped it, but then manually creating objects would be ugly.
Is this something I will have to live in Java for, or is there a way to avoid this pattern?
source share