java - How to get all properties name from groovy template -


i use groovy template java code:

import groovy.text.simpletemplateengine  string template = 'hello, $firstname <%print lastname%>!';  map vars = new hashmap<string, string>(); vars.put("firstname", "john"); vars.put("lastname", "doe");  simpletemplateengine engine = new simpletemplateengine(); writable w = engine.createtemplate(template).make(vars);  system.out.println(w.tostring()); 

how list off properties name template, e.g.:

  • firstname
  • lastname

?


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -