Class TemplateEngine.Block
java.lang.Object
org.apache.commons.jexl3.internal.TemplateEngine.Block
- Enclosing class:
- TemplateEngine
Abstract the source fragments, verbatim or immediate typed text blocks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The actual content.private final int
The block start line info.private final TemplateEngine.BlockType
The type of block, verbatim or directive. -
Constructor Summary
ConstructorsConstructorDescriptionBlock
(TemplateEngine.BlockType theType, int theLine, String theBlock) Creates a new block. -
Method Summary
Modifier and TypeMethodDescription(package private) String
getBody()
(package private) int
getLine()
(package private) TemplateEngine.BlockType
getType()
toString()
protected void
toString
(StringBuilder strb, String prefix) Appends this block string representation to a builder.
-
Field Details
-
type
The type of block, verbatim or directive. -
line
private final int lineThe block start line info. -
body
The actual content.
-
-
Constructor Details
-
Block
Block(TemplateEngine.BlockType theType, int theLine, String theBlock) Creates a new block.- Parameters:
theType
- the block typetheLine
- the line numbertheBlock
- the content
-
-
Method Details
-
getType
TemplateEngine.BlockType getType()- Returns:
- type
-
getLine
int getLine()- Returns:
- line
-
getBody
String getBody()- Returns:
- body
-
toString
-
toString
Appends this block string representation to a builder.- Parameters:
strb
- the string builder to append toprefix
- the line prefix (immediate or deferred)
-