@Test public void testNestedDecorator() { Hammer hammer = new Hammer(5); assertEquals("5:Edgar:bar", engine.compileMustache("{{age}}:{{foo}}:{{bar}}") .render(decorate(decorate(hammer).compute("foo", h -> h.getName()).build(engine)) .put("bar", "bar").build(engine))); }
public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); }
Decorator implements Mapper { public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); } }
Decorator implements Mapper { public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); } private  Decorator(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); }
Decorator implements Mapper { public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); } private  Decorator(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); static Builder<T> decorate(T delegate); static Decorator<T> decorate(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); @SuppressWarnings("unchecked") static T unwrap(T instance); @Override Object get(String key); @Override String toString(); }
Decorator implements Mapper { public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); } private  Decorator(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); static Builder<T> decorate(T delegate); static Decorator<T> decorate(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); @SuppressWarnings("unchecked") static T unwrap(T instance); @Override Object get(String key); @Override String toString(); static final String KEY_GET_DELEGATE; }