Hacker Newsnew | past | comments | ask | show | jobs | submit | throwaway242359's commentslogin

This is how I cope with Java DI.

I write my classes with one constructor that takes anything I need as final private members.

This has the benefit of working with any DI framework without any annotations or other hacks.

It also has the benefit of being usable or callable without using a DI framework.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: