-
- Enclosing class:
- Mustache
public static interface Mustache.VisitorUsed to visit the tags in a template without executing it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanvisitInclude(String name)Visits an include (partial) tag.booleanvisitInvertedSection(String name)Visits an inverted section tag.booleanvisitSection(String name)Visits a section tag.voidvisitText(String text)Visits a text segment.voidvisitVariable(String name)Visits a variable tag.
-
-
-
Method Detail
-
visitText
void visitText(String text)
Visits a text segment. These are blocks of text that are normally just reproduced as is when executing a template.- Parameters:
text- the block of text. May contain newlines.
-
visitVariable
void visitVariable(String name)
Visits a variable tag.- Parameters:
name- the name of the variable.
-
visitInclude
boolean visitInclude(String name)
Visits an include (partial) tag.- Parameters:
name- the name of the partial template specified by the tag.- Returns:
- true if the template should be resolved and visited, false to skip it.
-
visitSection
boolean visitSection(String name)
Visits a section tag.- Parameters:
name- the name of the section.- Returns:
- true if the contents of the section should be visited, false to skip.
-
visitInvertedSection
boolean visitInvertedSection(String name)
Visits an inverted section tag.- Parameters:
name- the name of the inverted section.- Returns:
- true if the contents of the section should be visited, false to skip.
-
-