Package org.apache.jasper.compiler
Class Node.Visitor
- java.lang.Object
-
- org.apache.jasper.compiler.Node.Visitor
-
- Enclosing class:
- Node
public static class Node.Visitor extends java.lang.ObjectA 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoVisit(Node n)This method provides a place to put actions that are common to all nodes.voidvisit(Node.AttributeDirective n)Visits an attribute directive node.voidvisit(Node.AttributeGenerator n)Visits an attribute generator node.voidvisit(Node.Comment n)Visits a comment node.voidvisit(Node.CustomTag n)Visits a custom tag node.voidvisit(Node.Declaration n)Visits a declaration node.voidvisit(Node.DoBodyAction n)Visits a do body action node.voidvisit(Node.ELExpression n)Visits an EL expression node.voidvisit(Node.Expression n)Visits an expression node.voidvisit(Node.FallBackAction n)voidvisit(Node.ForwardAction n)Visits a forward action node.voidvisit(Node.GetProperty n)Visits a get property node.voidvisit(Node.IncludeAction n)Visits an include action node.voidvisit(Node.IncludeDirective n)Visits an include directive node.voidvisit(Node.InvokeAction n)Visits an invoke action node.voidvisit(Node.JspBody n)Visits a JSP body node.voidvisit(Node.JspElement n)Visits a JSP element node.voidvisit(Node.JspOutput n)Visits a JSP output node.voidvisit(Node.JspRoot n)Visits a JSP root node.voidvisit(Node.JspText n)Visits a JSP text node.voidvisit(Node.NamedAttribute n)Visits a named attribute node.voidvisit(Node.PageDirective n)Visits a page directive node.voidvisit(Node.ParamAction n)Visits a param action node.voidvisit(Node.ParamsAction n)voidvisit(Node.PlugIn n)voidvisit(Node.Root n)Visits a root node.voidvisit(Node.Scriptlet n)Visits a scriptlet node.voidvisit(Node.SetProperty n)Visits a set property node.voidvisit(Node.TagDirective n)Visits a tag directive node.voidvisit(Node.TaglibDirective n)Visits a taglib directive node.voidvisit(Node.TemplateText n)Visits a template text node.voidvisit(Node.UninterpretedTag n)Visits an uninterpreted tag node.voidvisit(Node.UseBean n)Visits a use bean node.voidvisit(Node.VariableDirective n)Visits a variable directive node.protected voidvisitBody(Node n)Visit the body of a node, using the current visitor
-
-
-
Method Detail
-
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.ParamsAction n) throws JasperException
- Throws:
JasperException
-
visit
public void visit(Node.FallBackAction n) throws JasperException
- Throws:
JasperException
-
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.PlugIn n) throws JasperException
- Throws:
JasperException
-
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
-
-