Update Java client template to make getInstance calls more convenient.