Add new JavaSourceGenerator.java

Added new version of JavaSourceGenerator.