Package org.apache.jasper.compiler
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 String
private Node.TemplateText
private boolean
private StringBuilder
private int
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
This method breaks concatenation mode.void
This method provides a place to put actions that are common to all nodes.void
void
void
void
void
void
void
Visit 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.Visitor
This method provides a place to put actions that are common to all nodes. Override this in the child visitor class if need to.- Overrides:
doVisit
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visitBody
Description copied from class:Node.Visitor
Visit the body of a node, using the current visitor- Overrides:
visitBody
in classNode.Visitor
- Throws:
JasperException
-
visit
- Overrides:
visit
in 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
-