01: /*
02: @license.text@
03: */
04: package com.pavelvlasov.eval.samples;
05:
06: import java.util.HashMap;
07: import java.util.Map;
08:
09: import biz.hammurapi.config.MapContext;
10: import biz.hammurapi.convert.CompositeConverter;
11: import biz.hammurapi.eval.EvaluatingContext;
12:
13: /**
14: * @author Pavel Vlasov
15: * @revision $Revision$
16: */
17: public class EvaluatingContextSample {
18:
19: public static void main(String[] args) {
20: Map ctx = new HashMap();
21: ctx
22: .put("a", new String[] { "alpha", "beta", "gamma",
23: "delta" });
24: EvaluatingContext evaluator = new EvaluatingContext(
25: new MapContext(ctx), null, CompositeConverter
26: .getDefaultConverter());
27: System.out.println(evaluator.get("a[3].length()"));
28: }
29: }
|