@Test public void teTst() { String tpl = "<#assign key='f2'><#assign i=1>1:${f1}-2:${map['f2']}-3:${map[key]}-4:${map['f' + '2']}-5:${.vars['f' + i]}"; Map<String, Object> args = new HashMap<String, Object>(); args.put("f1", "f1v"); Map<String, Object> map = new HashMap<String, Object>(); map.put("f2", "f2v"); args.put("map", map); System.out.println(FreeMarkerUtils.format(tpl, args)); ; }
public static String format(String tpl, Map<String, Object> args) { return format(tpl, (Object) args); }
FreeMarkerUtils { public static String format(String tpl, Map<String, Object> args) { return format(tpl, (Object) args); } }
FreeMarkerUtils { public static String format(String tpl, Map<String, Object> args) { return format(tpl, (Object) args); } private  FreeMarkerUtils(); }
FreeMarkerUtils { public static String format(String tpl, Map<String, Object> args) { return format(tpl, (Object) args); } private  FreeMarkerUtils(); static String format(String tpl, Map<String, Object> args); static String format(String tpl, Object args); }
FreeMarkerUtils { public static String format(String tpl, Map<String, Object> args) { return format(tpl, (Object) args); } private  FreeMarkerUtils(); static String format(String tpl, Map<String, Object> args); static String format(String tpl, Object args);  }