refactor java backend to use more dependency injection

**please review**
I commented out two assertions in this diff because they introduced test dependencies on production code that were otherwise not present. It seemed to me the better solution than to significantly expand the size of this diff in order to support the assertions. Once each of those two classes is constructed by the injector it should be trivial to uncomment the assertions.