Cache the Java code generation templates
Merge pull request #720 from sharwell/cache-java-templates

Cache the Java code generation templates