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

# Class Node.Visitor

java.lang.Object
org.apache.jasper.compiler.Node.Visitor

Enclosing class:
  `Node`

public static class Node.Visitor extends Object
A visitor class for visiting the node. This class also provides the default action (i.e. nop) for each of the child class of the Node. An actual visitor should extend this class and supply the visit method for the nodes that it cares.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Visitor()`
  Constructs a new Visitor instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `doVisit(Node n)`
  This method provides a place to put actions that are common to all nodes.
  `void`
  `visit(Node.AttributeDirective n)`
  Visits an attribute directive node.
  `void`
  `visit(Node.AttributeGenerator n)`
  Visits an attribute generator node.
  `void`
  `visit(Node.Comment n)`
  Visits a comment node.
  `void`
  `visit(Node.CustomTag n)`
  Visits a custom tag node.
  `void`
  `visit(Node.Declaration n)`
  Visits a declaration node.
  `void`
  `visit(Node.DoBodyAction n)`
  Visits a do body action node.
  `void`
  `visit(Node.ELExpression n)`
  Visits an EL expression node.
  `void`
  `visit(Node.Expression n)`
  Visits an expression node.
  `void`
  `visit(Node.ForwardAction n)`
  Visits a forward action node.
  `void`
  `visit(Node.GetProperty n)`
  Visits a get property node.
  `void`
  `visit(Node.IncludeAction n)`
  Visits an include action node.
  `void`
  `visit(Node.IncludeDirective n)`
  Visits an include directive node.
  `void`
  `visit(Node.InvokeAction n)`
  Visits an invoke action node.
  `void`
  `visit(Node.JspBody n)`
  Visits a JSP body node.
  `void`
  `visit(Node.JspElement n)`
  Visits a JSP element node.
  `void`
  `visit(Node.JspOutput n)`
  Visits a JSP output node.
  `void`
  `visit(Node.JspRoot n)`
  Visits a JSP root node.
  `void`
  `visit(Node.JspText n)`
  Visits a JSP text node.
  `void`
  `visit(Node.NamedAttribute n)`
  Visits a named attribute node.
  `void`
  `visit(Node.PageDirective n)`
  Visits a page directive node.
  `void`
  `visit(Node.ParamAction n)`
  Visits a param action node.
  `void`
  `visit(Node.Root n)`
  Visits a root node.
  `void`
  `visit(Node.Scriptlet n)`
  Visits a scriptlet node.
  `void`
  `visit(Node.SetProperty n)`
  Visits a set property node.
  `void`
  `visit(Node.TagDirective n)`
  Visits a tag directive node.
  `void`
  `visit(Node.TaglibDirective n)`
  Visits a taglib directive node.
  `void`
  `visit(Node.TemplateText n)`
  Visits a template text node.
  `void`
  `visit(Node.UninterpretedTag n)`
  Visits an uninterpreted tag node.
  `void`
  `visit(Node.UseBean n)`
  Visits a use bean node.
  `void`
  `visit(Node.VariableDirective n)`
  Visits a variable directive node.
  `protected void`
  `visitBody(Node n)`
  Visit the body of a node, using the current visitor

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### Visitor

    public Visitor()
    Constructs a new Visitor instance.

- ## Method Details

  - ### doVisit

    protected void doVisit(Node n) throws JasperException
    This method provides a place to put actions that are common to all nodes. It is a NO-OP by default. Override this in the child visitor class if needed.
    Parameters:
      `n` - The node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visitBody

    protected void visitBody(Node n) throws JasperException
    Visit the body of a node, using the current visitor
    Parameters:
      `n` - The node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the body

  - ### visit

    public void visit(Node.Root n) throws JasperException
    Visits a root node.
    Parameters:
      `n` - The root node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.JspRoot n) throws JasperException
    Visits a JSP root node.
    Parameters:
      `n` - The JSP root node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.PageDirective n) throws JasperException
    Visits a page directive node.
    Parameters:
      `n` - The page directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.TagDirective n) throws JasperException
    Visits a tag directive node.
    Parameters:
      `n` - The tag directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.IncludeDirective n) throws JasperException
    Visits an include directive node.
    Parameters:
      `n` - The include directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.TaglibDirective n) throws JasperException
    Visits a taglib directive node.
    Parameters:
      `n` - The taglib directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.AttributeDirective n) throws JasperException
    Visits an attribute directive node.
    Parameters:
      `n` - The attribute directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.VariableDirective n) throws JasperException
    Visits a variable directive node.
    Parameters:
      `n` - The variable directive node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.Comment n) throws JasperException
    Visits a comment node.
    Parameters:
      `n` - The comment node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.Declaration n) throws JasperException
    Visits a declaration node.
    Parameters:
      `n` - The declaration node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.Expression n) throws JasperException
    Visits an expression node.
    Parameters:
      `n` - The expression node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.Scriptlet n) throws JasperException
    Visits a scriptlet node.
    Parameters:
      `n` - The scriptlet node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.ELExpression n) throws JasperException
    Visits an EL expression node.
    Parameters:
      `n` - The EL expression node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.IncludeAction n) throws JasperException
    Visits an include action node.
    Parameters:
      `n` - The include action node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.ForwardAction n) throws JasperException
    Visits a forward action node.
    Parameters:
      `n` - The forward action node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.GetProperty n) throws JasperException
    Visits a get property node.
    Parameters:
      `n` - The get property node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.SetProperty n) throws JasperException
    Visits a set property node.
    Parameters:
      `n` - The set property node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.ParamAction n) throws JasperException
    Visits a param action node.
    Parameters:
      `n` - The param action node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.UseBean n) throws JasperException
    Visits a use bean node.
    Parameters:
      `n` - The use bean node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.CustomTag n) throws JasperException
    Visits a custom tag node.
    Parameters:
      `n` - The custom tag node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.UninterpretedTag n) throws JasperException
    Visits an uninterpreted tag node.
    Parameters:
      `n` - The uninterpreted tag node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.JspElement n) throws JasperException
    Visits a JSP element node.
    Parameters:
      `n` - The JSP element node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.JspText n) throws JasperException
    Visits a JSP text node.
    Parameters:
      `n` - The JSP text node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.NamedAttribute n) throws JasperException
    Visits a named attribute node.
    Parameters:
      `n` - The named attribute node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.JspBody n) throws JasperException
    Visits a JSP body node.
    Parameters:
      `n` - The JSP body node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.InvokeAction n) throws JasperException
    Visits an invoke action node.
    Parameters:
      `n` - The invoke action node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.DoBodyAction n) throws JasperException
    Visits a do body action node.
    Parameters:
      `n` - The do body action node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.TemplateText n) throws JasperException
    Visits a template text node.
    Parameters:
      `n` - The template text node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.JspOutput n) throws JasperException
    Visits a JSP output node.
    Parameters:
      `n` - The JSP output node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node

  - ### visit

    public void visit(Node.AttributeGenerator n) throws JasperException
    Visits an attribute generator node.
    Parameters:
      `n` - The attribute generator node to visit
    Throws:
      `JasperException` - if an error occurs while visiting the node