@Internal public class SectionSegment extends java.lang.Object
The content is not rendered if there is no object found in the context, or the found object is:
Boolean of value false,Iterable with no elements,The content is rendered one or more times if there is an object found in the context. If the found object is:
Iterable or array, the content is rendered for each
element,Boolean of value true, the content is rendered
once,Lambda, the content is processed according to the
lambda's specification,Lambda,
InvertedSectionSegment| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Segment> |
segments |
| Constructor and Description |
|---|
SectionSegment(java.lang.String text,
Origin origin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSegment(Segment segment) |
protected void |
append(java.lang.Appendable appendable,
java.lang.String text) |
void |
execute(java.lang.Appendable appendable,
ExecutionContext context)
Execute this segment (e.g. write down some variable value).
|
protected java.lang.String |
getContainingLiteralBlock() |
protected java.lang.String |
getDefaultEndDelimiter() |
protected java.lang.String |
getDefaultStartDelimiter() |
protected MustacheEngine |
getEngine() |
protected Configuration |
getEngineConfiguration() |
java.lang.String |
getLiteralBlock() |
Origin |
getOrigin() |
protected java.lang.String |
getSegmentName() |
java.util.List<Segment> |
getSegments() |
int |
getSegmentsSize() |
protected java.lang.String |
getTagLiteral(java.lang.String content) |
TemplateSegment |
getTemplate() |
java.lang.String |
getText() |
SegmentType |
getType() |
protected void |
checkModificationAllowed() |
protected boolean |
isReadOnly() |
java.util.Iterator<Segment> |
iterator() |
void |
performPostProcessing()
Perform compilation post processing, e.g. optimization.
|
java.lang.String |
toString() |
protected java.util.List<Segment> segments
public SectionSegment(java.lang.String text,
Origin origin)
public SegmentType getType()
public void execute(java.lang.Appendable appendable,
ExecutionContext context)
Segmentpublic java.lang.String getLiteralBlock()
getLiteralBlock in interface SegmentLambda.InputType.LITERALprotected java.lang.String getContainingLiteralBlock()
public void performPostProcessing()
SegmentperformPostProcessing in interface Segmentpublic void addSegment(Segment segment)
addSegment in interface ContainerSegmentpublic java.util.Iterator<Segment> iterator()
iterator in interface java.lang.Iterable<Segment>public java.util.List<Segment> getSegments()
getSegments in interface ContainerSegmentpublic int getSegmentsSize()
getSegmentsSize in interface ContainerSegmentprotected java.lang.String getSegmentName()
public java.lang.String getText()
public Origin getOrigin()
public java.lang.String toString()
toString in class java.lang.Objectpublic TemplateSegment getTemplate()
protected boolean isReadOnly()
protected MustacheEngine getEngine()
protected Configuration getEngineConfiguration()
protected java.lang.String getDefaultStartDelimiter()
protected java.lang.String getDefaultEndDelimiter()
protected java.lang.String getTagLiteral(java.lang.String content)
protected void append(java.lang.Appendable appendable,
java.lang.String text)
protected void checkModificationAllowed()
Copyright © 2013. All Rights Reserved.