Class TemplateRenderer


  • public class TemplateRenderer
    extends Object
    A template renderer is a thread safe string renderer that can bind values to parameters. It is not as sophisticated as MessageFormat but in contrast can be shared between threads because it is immutable. Parameters are denoted by a question mark directly followed by the parameter index. The following example should illustrate the usage. new TemplateRenderer("?1 limit ?2") .start(context) .addArgument(1) .addArgument(2) .build();
    Since:
    1.0.6
    Author:
    Christian Beikov
    • Constructor Detail

      • TemplateRenderer

        public TemplateRenderer​(String template)
        Creates a new template renderer from the given template.
        Parameters:
        template - The template on which this renderer is based.