Feature/java generator changes

Various changes for the Java generator. Only remaining issues appear to be with imports.

@jonasacres