translate to Java with stringtemplate