Add template maker for scala getter.