Class TemplateEngine.Block
- java.lang.Object
-
- org.apache.commons.jexl3.internal.TemplateEngine.Block
-
- Enclosing class:
- TemplateEngine
static final class TemplateEngine.Block extends java.lang.ObjectAbstract the source fragments, verbatim or immediate typed text blocks.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbodyThe actual content.private intlineThe block start line info.private TemplateEngine.BlockTypetypeThe type of block: verbatim or directive.
-
Constructor Summary
Constructors Constructor Description Block(TemplateEngine.BlockType theType, int theLine, java.lang.String theBlock)Creates a new block.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.StringgetBody()(package private) intgetLine()(package private) TemplateEngine.BlockTypegetType()(package private) voidtoString(java.lang.StringBuilder strb, java.lang.String prefix)Appends this block string representation to a builder.
-
-
-
Field Detail
-
type
private final TemplateEngine.BlockType type
The type of block: verbatim or directive.
-
line
private final int line
The block start line info.
-
body
private final java.lang.String body
The actual content.
-
-
Constructor Detail
-
Block
Block(TemplateEngine.BlockType theType, int theLine, java.lang.String theBlock)
Creates a new block.- Parameters:
theType- the block typetheLine- the line numbertheBlock- the content
-
-
Method Detail
-
getBody
java.lang.String getBody()
- Returns:
- body
-
getLine
int getLine()
- Returns:
- line
-
getType
TemplateEngine.BlockType getType()
- Returns:
- type
-
toString
void toString(java.lang.StringBuilder strb, java.lang.String prefix)Appends this block string representation to a builder.- Parameters:
strb- the string builder to append toprefix- the line prefix (immediate or deferred)
-
-