Update JavaGenerator.xtend

Written code for master and slave specific initialization