Class MustacheParser


  • public class MustacheParser
    extends java.lang.Object
    The parser generates callbacks into the MustacheFactory to build them. Do not use these directly as you must manage the Mustache object lifecycle as well.

    User: sam Date: 5/14/11 Time: 3:52 PM

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Mustache compile​(java.io.Reader reader, java.lang.String file)  
      Mustache compile​(java.io.Reader reader, java.lang.String file, java.lang.String sm, java.lang.String em)  
      Mustache compile​(java.io.Reader reader, java.lang.String file, java.lang.String sm, java.lang.String em, boolean startOfLine)  
      protected Mustache compile​(java.io.Reader reader, java.lang.String tag, java.util.concurrent.atomic.AtomicInteger currentLine, java.lang.String file, java.lang.String sm, java.lang.String em, boolean startOfLine)  
      Mustache compile​(java.lang.String file)  
      void setAllowChangingDelimeters​(boolean allowChangingDelimeters)  
      private java.lang.StringBuilder write​(MustacheVisitor mv, java.lang.StringBuilder out, java.lang.String file, int line, boolean startOfLine)
      Ignore empty strings and append to the previous code if it was also a write.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • specConformWhitespace

        private final boolean specConformWhitespace
      • allowChangingDelimeters

        private boolean allowChangingDelimeters
    • Constructor Detail

      • MustacheParser

        protected MustacheParser​(MustacheFactory mf,
                                 boolean specConformWhitespace)
    • Method Detail

      • compile

        public Mustache compile​(java.lang.String file)
      • compile

        public Mustache compile​(java.io.Reader reader,
                                java.lang.String file)
      • compile

        public Mustache compile​(java.io.Reader reader,
                                java.lang.String file,
                                java.lang.String sm,
                                java.lang.String em)
      • compile

        public Mustache compile​(java.io.Reader reader,
                                java.lang.String file,
                                java.lang.String sm,
                                java.lang.String em,
                                boolean startOfLine)
      • compile

        protected Mustache compile​(java.io.Reader reader,
                                   java.lang.String tag,
                                   java.util.concurrent.atomic.AtomicInteger currentLine,
                                   java.lang.String file,
                                   java.lang.String sm,
                                   java.lang.String em,
                                   boolean startOfLine)
                            throws MustacheException
        Throws:
        MustacheException
      • write

        private java.lang.StringBuilder write​(MustacheVisitor mv,
                                              java.lang.StringBuilder out,
                                              java.lang.String file,
                                              int line,
                                              boolean startOfLine)
        Ignore empty strings and append to the previous code if it was also a write.
      • setAllowChangingDelimeters

        public void setAllowChangingDelimeters​(boolean allowChangingDelimeters)