@Test public void testFieldRender() { FieldRender render = new FieldRender("[a][b]"); HashMap event = new HashMap() {{ this.put("test1", "ab"); this.put("a", new HashMap() {{ this.put("b", 123); this.put("b2", "hello"); }}); }}; Object rst = render.render(event); Assert.assertEquals(123, rst); }
public FieldRender(String template) { Matcher m = p.matcher(template); while (m.find()) { String a = m.group(); this.fields.add(a.substring(1, a.length() - 1)); } }
FieldRender implements TemplateRender { public FieldRender(String template) { Matcher m = p.matcher(template); while (m.find()) { String a = m.group(); this.fields.add(a.substring(1, a.length() - 1)); } } }
FieldRender implements TemplateRender { public FieldRender(String template) { Matcher m = p.matcher(template); while (m.find()) { String a = m.group(); this.fields.add(a.substring(1, a.length() - 1)); } } FieldRender(String template); }
FieldRender implements TemplateRender { public FieldRender(String template) { Matcher m = p.matcher(template); while (m.find()) { String a = m.group(); this.fields.add(a.substring(1, a.length() - 1)); } } FieldRender(String template); Object render(Map event); }
FieldRender implements TemplateRender { public FieldRender(String template) { Matcher m = p.matcher(template); while (m.find()) { String a = m.group(); this.fields.add(a.substring(1, a.length() - 1)); } } FieldRender(String template); Object render(Map event);  }