Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » jasper » compiler » [javadoc | source]
org.apache.jasper.compiler
abstract class: Node [javadoc | source]
java.lang.Object
   org.apache.jasper.compiler.Node

All Implemented Interfaces:
    TagConstants

Direct Known Subclasses:
    ForwardAction, Expression, UninterpretedTag, AttributeGenerator, SetProperty, FallBackAction, JspBody, JspRoot, IncludeDirective, GetProperty, PageDirective, UseBean, JspText, JspOutput, CustomTag, DoBodyAction, PlugIn, Declaration, JspElement, ScriptingElement, Root, TemplateText, ParamAction, Comment, InvokeAction, TagDirective, IncludeAction, AttributeDirective, Scriptlet, ParamsAction, ELExpression, NamedAttribute, TaglibDirective, VariableDirective

An internal data representation of a JSP page or a JSP docuement (XML). Also included here is a visitor class for tranversing nodes.
Nested Class Summary:
public static class  Node.Root  Represents the root of a Jsp page or Jsp document 
public static class  Node.JspRoot  Represents the root of a Jsp document (XML syntax) 
public static class  Node.PageDirective  Represents a page directive 
public static class  Node.IncludeDirective  Represents an include directive 
public static class  Node.TaglibDirective  Represents a custom taglib directive 
public static class  Node.TagDirective  Represents a tag directive 
public static class  Node.AttributeDirective  Represents an attribute directive 
public static class  Node.VariableDirective  Represents a variable directive 
public static class  Node.InvokeAction  Represents a tag file action 
public static class  Node.DoBodyAction  Represents a tag file action 
public static class  Node.Comment  Represents a Jsp comment Comments are kept for completeness. 
abstract public static class  Node.ScriptingElement  Represents an expression, declaration, or scriptlet 
public static class  Node.Declaration  Represents a declaration 
public static class  Node.Expression  Represents an expression. Expressions in attributes are embedded in the attribute string and not here. 
public static class  Node.Scriptlet  Represents a scriptlet 
public static class  Node.ELExpression  Represents an EL expression. Expressions in attributes are embedded in the attribute string and not here. 
public static class  Node.ParamAction  Represents a param action 
public static class  Node.ParamsAction  Represents a params action 
public static class  Node.FallBackAction  Represents a fallback action 
public static class  Node.IncludeAction  Represents an include action 
public static class  Node.ForwardAction  Represents a forward action 
public static class  Node.GetProperty  Represents a getProperty action 
public static class  Node.SetProperty  Represents a setProperty action 
public static class  Node.UseBean  Represents a useBean action 
public static class  Node.PlugIn  Represents a plugin action 
public static class  Node.UninterpretedTag  Represents an uninterpreted tag, from a Jsp document 
public static class  Node.JspElement  Represents a
public static class  Node.JspOutput  Represents a
public static class  Node.ChildInfo  Collected information about child elements. Used by nodes like CustomTag, JspBody, and NamedAttribute. The information is set in the Collector. 
public static class  Node.CustomTag  Represents a custom tag 
public static class  Node.AttributeGenerator  Used as a placeholder for the evaluation code of a custom action attribute (used by the tag plugin machinery only). 
public static class  Node.JspText  Represents the body of a <jsp:text> element 
public static class  Node.NamedAttribute  Represents a Named Attribute (<jsp:attribute>) 
public static class  Node.JspBody  Represents a JspBody node (<jsp:body>) 
public static class  Node.TemplateText  Represents a template text string 
public static class  Node.JspAttribute  Represents attributes that can be request time expressions. Can either be a plain attribute, an attribute that represents a request time expression value, or a named attribute (specified using the jsp:attribute standard action). 
public static class  Node.Nodes  An ordered list of Node, used to represent the body of an element, or a jsp page of jsp document. 
public static class  Node.Visitor  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. 
Field Summary
protected  Attributes attrs     
protected  Attributes taglibAttrs     
protected  Attributes nonTaglibXmlnsAttrs     
protected  Node.Nodes body     
protected  String text     
protected  Mark startMark     
protected  int beginJavaLine     
protected  int endJavaLine     
protected  Node parent     
protected  Node.Nodes namedAttributeNodes     
protected  String qName     
protected  String localName     
protected  String innerClassName     
Constructor:
 public Node() 
 public Node(Mark start,
    Node parent) 
    Constructor.
    Parameters:
    start - The location of the jsp page
    parent - The enclosing node
 public Node(String qName,
    String localName,
    Mark start,
    Node parent) 
    Constructor.
    Parameters:
    qName - The action's qualified name
    localName - The action's local name
    start - The location of the jsp page
    parent - The enclosing node
 public Node(String qName,
    String localName,
    Attributes attrs,
    Mark start,
    Node parent) 
    Constructor for Nodes parsed from standard syntax.
    Parameters:
    qName - The action's qualified name
    localName - The action's local name
    attrs - The attributes for this node
    start - The location of the jsp page
    parent - The enclosing node
 public Node(String qName,
    String localName,
    String text,
    Mark start,
    Node parent) 
 public Node(String qName,
    String localName,
    Attributes attrs,
    Attributes nonTaglibXmlnsAttrs,
    Attributes taglibAttrs,
    Mark start,
    Node parent) 
    Constructor for Nodes parsed from XML syntax.
    Parameters:
    qName - The action's qualified name
    localName - The action's local name
    attrs - The action's attributes whose name does not start with xmlns
    nonTaglibXmlnsAttrs - The action's xmlns attributes that do not represent tag libraries
    taglibAttrs - The action's xmlns attributes that represent tag libraries
    start - The location of the jsp page
    parent - The enclosing node
Method from org.apache.jasper.compiler.Node Summary:
accept,   getAttributeValue,   getAttributes,   getBeginJavaLine,   getBody,   getEndJavaLine,   getInnerClassName,   getLocalName,   getNamedAttributeNode,   getNamedAttributeNodes,   getNonTaglibXmlnsAttributes,   getParent,   getQName,   getRoot,   getStart,   getTaglibAttributes,   getText,   getTextAttribute,   isDummy,   setAttributes,   setBeginJavaLine,   setBody,   setEndJavaLine,   setInnerClassName
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.compiler.Node Detail:
 abstract  void accept(Node.Visitor v) throws JasperException
    Selects and invokes a method in the visitor class based on the node type. This is abstract and should be overrode by the extending classes.
 public String getAttributeValue(String name) 
 public Attributes getAttributes() 
 public int getBeginJavaLine() 
 public Node.Nodes getBody() 
 public int getEndJavaLine() 
 public String getInnerClassName() 
 public String getLocalName() 
 public Node.NamedAttribute getNamedAttributeNode(String name) 
    Searches all subnodes of this node for jsp:attribute standard actions with the given name, and returns the NamedAttribute node of the matching named attribute, nor null if no such node is found.

    This should always be called and only be called for nodes that accept dynamic runtime attribute expressions.

 public Node.Nodes getNamedAttributeNodes() 
    Searches all subnodes of this node for jsp:attribute standard actions, and returns that set of nodes as a Node.Nodes object.
 public Attributes getNonTaglibXmlnsAttributes() 
 public Node getParent() 
 public String getQName() 
 public Node.Root getRoot() 
 public Mark getStart() 
 public Attributes getTaglibAttributes() 
 public String getText() 
 public String getTextAttribute(String name) 
    Get the attribute that is non request time expression, either from the attribute of the node, or from a jsp:attrbute
 public boolean isDummy() 
 public  void setAttributes(Attributes attrs) 
 public  void setBeginJavaLine(int begin) 
 public  void setBody(Node.Nodes body) 
 public  void setEndJavaLine(int end) 
 public  void setInnerClassName(String icn)