Package com.github.mustachejava
Class MustacheParser
- java.lang.Object
-
- com.github.mustachejava.MustacheParser
-
public class MustacheParser extends java.lang.ObjectThe 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
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowChangingDelimetersstatic java.lang.StringDEFAULT_EMstatic java.lang.StringDEFAULT_SMprivate MustacheFactorymfprivate booleanspecConformWhitespace
-
Constructor Summary
Constructors Modifier Constructor Description protectedMustacheParser(MustacheFactory mf)protectedMustacheParser(MustacheFactory mf, boolean specConformWhitespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mustachecompile(java.io.Reader reader, java.lang.String file)Mustachecompile(java.io.Reader reader, java.lang.String file, java.lang.String sm, java.lang.String em)Mustachecompile(java.io.Reader reader, java.lang.String file, java.lang.String sm, java.lang.String em, boolean startOfLine)protected Mustachecompile(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)Mustachecompile(java.lang.String file)voidsetAllowChangingDelimeters(boolean allowChangingDelimeters)private java.lang.StringBuilderwrite(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.
-
-
-
Field Detail
-
DEFAULT_SM
public static final java.lang.String DEFAULT_SM
- See Also:
- Constant Field Values
-
DEFAULT_EM
public static final java.lang.String DEFAULT_EM
- See Also:
- Constant Field Values
-
specConformWhitespace
private final boolean specConformWhitespace
-
mf
private final MustacheFactory mf
-
allowChangingDelimeters
private boolean allowChangingDelimeters
-
-
Constructor Detail
-
MustacheParser
protected MustacheParser(MustacheFactory mf, boolean specConformWhitespace)
-
MustacheParser
protected MustacheParser(MustacheFactory mf)
-
-
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)
-
-