Class TemplateEngine.Block
- java.lang.Object
-
- org.apache.commons.jexl3.internal.TemplateEngine.Block
-
- Enclosing class:
- TemplateEngine
static final class TemplateEngine.Block extends java.lang.Object
Abstract the source fragments, verbatim or immediate typed text blocks.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
body
The actual content.private int
line
The block start line info.private TemplateEngine.BlockType
type
The 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.String
getBody()
(package private) int
getLine()
(package private) TemplateEngine.BlockType
getType()
protected void
toString(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
protected 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)
-
-