Here you can find the source of replaceAtSymbol(String s, List
public static String replaceAtSymbol(String s, List<String> params)
//package com.java2s; import java.util.List; public class Main { private static final String VELOCITY_VARIABLE_PREFIX = "'\\${"; private static final String VELOCITY_VARIABLE_SUFFIX = "}'"; public static String replaceAtSymbol(String s, List<String> params) { for (String param : params) { String paramTemp = VELOCITY_VARIABLE_PREFIX + param + VELOCITY_VARIABLE_SUFFIX; s = s.replaceFirst("@([\\w]*)", paramTemp); }/*from w ww . j a va 2s . c om*/ return s; } }