Examples of defineTemplate()


Examples of org.stringtemplate.v4.STGroup.defineTemplate()

    innerGroup.defineTemplate("samegroup", "x", "hi ");
    ST st = innerGroup.getInstanceOf("test");
    st.add("m", 10);

    STGroup outerGroup = new STGroup();
    outerGroup.defineTemplate("errorMessage", "x", "<x>");
    ST outerST = outerGroup.getInstanceOf("errorMessage");
    outerST.add("x", st);

    String expected = "hi ";
    String result = outerST.render();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.