TextOptimizer (Apache Tomcat 11.0.24 API Documentation)
Description: declaration: package: org.apache.jasper.compiler, class: TextOptimizer

# Class TextOptimizer

java.lang.Object
org.apache.jasper.compiler.TextOptimizer

public class TextOptimizer extends Object
Provides optimizations for text nodes in JSP pages.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TextOptimizer()`
  Constructs a new TextOptimizer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `concatenate(Compiler compiler, Node.Nodes page)`
  Concatenates contiguous text nodes in the given page to reduce the number of write operations in the generated servlet code.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TextOptimizer

    public TextOptimizer()
    Constructs a new TextOptimizer. This utility class should not be instantiated.

- ## Method Details

  - ### concatenate

    public static void concatenate(Compiler compiler, Node.Nodes page) throws JasperException
    Concatenates contiguous text nodes in the given page to reduce the number of write operations in the generated servlet code.
    Parameters:
      `compiler` - the JSP compiler
      `page` - the page node tree
    Throws:
      `JasperException` - if an error occurs during optimization