Class TextOptimizer.TextCatVisitor
java.lang.Object
org.apache.jasper.compiler.Node.Visitor
org.apache.jasper.compiler.TextOptimizer.TextCatVisitor
- Enclosing class:
TextOptimizer
A visitor to concatenate contiguous template texts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate Node.TemplateTextprivate booleanprivate StringBuilderprivate intprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidThis method breaks concatenation mode.voidThis method provides a place to put actions that are common to all nodes.voidvoidvoidvoidvoidvoidvoidVisit the body of a node, using the current visitor
-
Field Details
-
textNodeCount
private int textNodeCount -
firstTextNode
-
textBuffer
-
emptyText
-
prePass
private boolean prePass -
trim
private boolean trim
-
-
Constructor Details
-
TextCatVisitor
public TextCatVisitor(boolean prePass, boolean trim)
-
-
Method Details
-
doVisit
Description copied from class:Node.VisitorThis method provides a place to put actions that are common to all nodes. Override this in the child visitor class if need to.- Overrides:
doVisitin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
visitBody
Description copied from class:Node.VisitorVisit the body of a node, using the current visitor- Overrides:
visitBodyin classNode.Visitor- Throws:
JasperException
-
visit
- Overrides:
visitin classNode.Visitor- Throws:
JasperException
-
collectText
private void collectText()This method breaks concatenation mode. As a side effect it copies the concatenated string to the first text node
-