Class Mustache


  • public class Mustache
    extends java.lang.Object
    Provides Mustache templating services.

    Basic usage:

    
     String source = "Hello {{arg}}!";
     Template tmpl = Mustache.compiler().compile(source);
     Map<String, Object> context = new HashMap<String, Object>();
     context.put("arg", "world");
     tmpl.execute(context); // returns "Hello world!"
     
    • Constructor Detail

      • Mustache

        private Mustache()
    • Method Detail

      • compiler

        public static Mustache.Compiler compiler()
        Returns a compiler that escapes HTML by default and does not use standards mode.
      • compile

        protected static Template compile​(java.io.Reader source,
                                          Mustache.Compiler compiler)
        Compiles the supplied template into a repeatedly executable intermediate form.
      • restoreStartTag

        protected static void restoreStartTag​(java.lang.StringBuilder text,
                                              Mustache.Delims starts)
      • allowsWhitespace

        protected static boolean allowsWhitespace​(char typeChar)