1 /*
2 * joey-gen and its relative products are published under the terms
3 * of the Apache Software License.
4 *
5 * Created on 2005/01/14 17:56:12
6 */
7 package org.asyrinx.joey.gen.velocity;
8
9 import java.util.HashMap;
10 import java.util.Map;
11
12 import org.apache.velocity.context.Context;
13
14 /***
15 * @author takeshi
16 */
17 public class VelocityUtils {
18
19 public static Map toMap(Context context) {
20 final Map result = new HashMap();
21 final Object[] keys = context.getKeys();
22 for (int i = 0; i < keys.length; i++)
23 result.put(keys[i], context.get(String.valueOf(keys[i])));
24 return result;
25 }
26 }