exposing template function through java api :thought_balloon: