@Test public void basicTest() { final Test1 object = new Test1() { }; final Test1 newObject = VariableInterpolation.interpolate(new HashMap<String, Object>() {{ put("input", new HashMap<String, String>() {{ put("value1", "myvalue1"); put("value2", "myvalue2"); }}); }}, object); assertEquals("myvalue1", newObject.getValue1()); assertEquals("myvalue2", newObject.getValue2()); assertEquals("myvalue1", newObject.getValue3()); }
public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); }
VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } }
VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private  VariableInterpolation(); }
VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private  VariableInterpolation(); static T interpolate(final Map<String, Object> values,
                                    final T object); static T proxy(final T instance); }
VariableInterpolation { public static <T> T interpolate(final Map<String, Object> values, final T object) { interpolator.setDefaultLookup(new MapOfMapStrLookup(values)); return proxy(object); } private  VariableInterpolation(); static T interpolate(final Map<String, Object> values,
                                    final T object); static T proxy(final T instance);  }