Package org.apache.jasper.compiler
Class Node
- java.lang.Object
-
- org.apache.jasper.compiler.Node
-
- All Implemented Interfaces:
TagConstants
- Direct Known Subclasses:
Node.AttributeDirective
,Node.AttributeGenerator
,Node.ChildInfoBase
,Node.Comment
,Node.DoBodyAction
,Node.ELExpression
,Node.FallBackAction
,Node.ForwardAction
,Node.GetProperty
,Node.IncludeAction
,Node.IncludeDirective
,Node.InvokeAction
,Node.JspElement
,Node.JspOutput
,Node.JspRoot
,Node.JspText
,Node.PageDirective
,Node.ParamAction
,Node.ParamsAction
,Node.PlugIn
,Node.Root
,Node.ScriptingElement
,Node.SetProperty
,Node.TagDirective
,Node.TaglibDirective
,Node.TemplateText
,Node.UninterpretedTag
,Node.UseBean
,Node.VariableDirective
public abstract class Node extends java.lang.Object implements TagConstants
An internal data representation of a JSP page or a JSP document (XML). Also included here is a visitor class for traversing nodes.- Author:
- Kin-man Chung, Jan Luehe, Shawn Bayern, Mark Roth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.AttributeDirective
Represents an attribute directivestatic class
Node.AttributeGenerator
Used as a placeholder for the evaluation code of a custom action attribute (used by the tag plugin machinery only).static class
Node.ChildInfo
Collected information about child elements.static class
Node.ChildInfoBase
static class
Node.Comment
Represents a Jsp comment Comments are kept for completeness.static class
Node.CustomTag
Represents a custom tagstatic class
Node.Declaration
Represents a declarationstatic class
Node.DoBodyAction
Represents a <jsp:doBody> tag file actionstatic class
Node.ELExpression
Represents an EL expression.static class
Node.Expression
Represents an expression.static class
Node.FallBackAction
Represents a fallback actionstatic class
Node.ForwardAction
Represents a forward actionstatic class
Node.GetProperty
Represents a getProperty actionstatic class
Node.IncludeAction
Represents an include actionstatic class
Node.IncludeDirective
Represents an include directivestatic class
Node.InvokeAction
Represents a <jsp:invoke> tag file actionstatic class
Node.JspAttribute
Represents attributes that can be request time expressions.static class
Node.JspBody
Represents a JspBody node (<jsp:body>)static class
Node.JspElement
Represents a <jsp:element>.static class
Node.JspOutput
Represents a <jsp:output>.static class
Node.JspRoot
Represents the root of a Jsp document (XML syntax)static class
Node.JspText
Represents the body of a <jsp:text> elementstatic class
Node.NamedAttribute
Represents a Named Attribute (<jsp:attribute>)static class
Node.Nodes
An ordered list of Node, used to represent the body of an element, or a jsp page of jsp document.static class
Node.PageDirective
Represents a page directivestatic class
Node.ParamAction
Represents a param actionstatic class
Node.ParamsAction
Represents a params actionstatic class
Node.PlugIn
Represents a plugin actionstatic class
Node.Root
Represents the root of a Jsp page or Jsp documentstatic class
Node.ScriptingElement
Represents an expression, declaration, or scriptletstatic class
Node.Scriptlet
Represents a scriptletstatic class
Node.SetProperty
Represents a setProperty actionstatic class
Node.TagDirective
Represents a tag directivestatic class
Node.TaglibDirective
Represents a custom taglib directivestatic class
Node.TemplateText
Represents a template text stringstatic class
Node.UninterpretedTag
Represents an uninterpreted tag, from a Jsp documentstatic class
Node.UseBean
Represents a useBean actionstatic class
Node.VariableDirective
Represents a variable directivestatic class
Node.Visitor
A visitor class for visiting the node.
-
Field Summary
Fields Modifier and Type Field Description protected org.xml.sax.Attributes
attrs
protected int
beginJavaLine
protected Node.Nodes
body
protected int
endJavaLine
protected java.lang.String
innerClassName
protected java.lang.String
localName
protected Node.Nodes
namedAttributeNodes
protected org.xml.sax.Attributes
nonTaglibXmlnsAttrs
protected Node
parent
protected java.lang.String
qName
protected Mark
startMark
protected org.xml.sax.Attributes
taglibAttrs
protected java.lang.String
text
-
Fields inherited from interface org.apache.jasper.compiler.TagConstants
ATTRIBUTE_ACTION, ATTRIBUTE_DIRECTIVE_ACTION, BODY_ACTION, DECLARATION_ACTION, DIRECTIVE_ACTION, DOBODY_ACTION, ELEMENT_ACTION, EXPRESSION_ACTION, FALLBACK_ACTION, FORWARD_ACTION, GET_PROPERTY_ACTION, INCLUDE_ACTION, INCLUDE_DIRECTIVE_ACTION, INVOKE_ACTION, JSP_ATTRIBUTE_ACTION, JSP_ATTRIBUTE_DIRECTIVE_ACTION, JSP_BODY_ACTION, JSP_DECLARATION_ACTION, JSP_DOBODY_ACTION, JSP_ELEMENT_ACTION, JSP_EXPRESSION_ACTION, JSP_FALLBACK_ACTION, JSP_FORWARD_ACTION, JSP_GET_PROPERTY_ACTION, JSP_INCLUDE_ACTION, JSP_INCLUDE_DIRECTIVE_ACTION, JSP_INVOKE_ACTION, JSP_OUTPUT_ACTION, JSP_PAGE_DIRECTIVE_ACTION, JSP_PARAM_ACTION, JSP_PARAMS_ACTION, JSP_PLUGIN_ACTION, JSP_ROOT_ACTION, JSP_SCRIPTLET_ACTION, JSP_SET_PROPERTY_ACTION, JSP_TAG_DIRECTIVE_ACTION, JSP_TAGLIB_DIRECTIVE_ACTION, JSP_TEXT_ACTION, JSP_TEXT_ACTION_END, JSP_URI, JSP_USE_BEAN_ACTION, JSP_VARIABLE_DIRECTIVE_ACTION, OUTPUT_ACTION, PAGE_DIRECTIVE_ACTION, PARAM_ACTION, PARAMS_ACTION, PLUGIN_ACTION, ROOT_ACTION, SCRIPTLET_ACTION, SET_PROPERTY_ACTION, TAG_DIRECTIVE_ACTION, TAGLIB_DIRECTIVE_ACTION, TEXT_ACTION, URN_JSPTAGDIR, URN_JSPTLD, USE_BEAN_ACTION, VARIABLE_DIRECTIVE_ACTION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.Attributes
getAttributes()
java.lang.String
getAttributeValue(java.lang.String name)
int
getBeginJavaLine()
Node.Nodes
getBody()
int
getEndJavaLine()
java.lang.String
getInnerClassName()
java.lang.String
getLocalName()
Node.NamedAttribute
getNamedAttributeNode(java.lang.String name)
Searches all sub-nodes of this node for jsp:attribute standard actions with the given name.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.org.xml.sax.Attributes
getNonTaglibXmlnsAttributes()
Node
getParent()
java.lang.String
getQName()
Node.Root
getRoot()
Mark
getStart()
org.xml.sax.Attributes
getTaglibAttributes()
java.lang.String
getText()
java.lang.String
getTextAttribute(java.lang.String name)
Get the attribute that is non request time expression, either from the attribute of the node, or from a jsp:attributevoid
setAttributes(org.xml.sax.Attributes attrs)
void
setBeginJavaLine(int begin)
void
setBody(Node.Nodes body)
void
setEndJavaLine(int end)
void
setInnerClassName(java.lang.String icn)
-
-
-
Field Detail
-
attrs
protected org.xml.sax.Attributes attrs
-
taglibAttrs
protected org.xml.sax.Attributes taglibAttrs
-
nonTaglibXmlnsAttrs
protected org.xml.sax.Attributes nonTaglibXmlnsAttrs
-
body
protected Node.Nodes body
-
text
protected java.lang.String text
-
startMark
protected Mark startMark
-
beginJavaLine
protected int beginJavaLine
-
endJavaLine
protected int endJavaLine
-
parent
protected Node parent
-
namedAttributeNodes
protected Node.Nodes namedAttributeNodes
-
qName
protected java.lang.String qName
-
localName
protected java.lang.String localName
-
innerClassName
protected java.lang.String innerClassName
-
-
Method Detail
-
getQName
public java.lang.String getQName()
-
getLocalName
public java.lang.String getLocalName()
-
getAttributes
public org.xml.sax.Attributes getAttributes()
-
getTaglibAttributes
public org.xml.sax.Attributes getTaglibAttributes()
-
getNonTaglibXmlnsAttributes
public org.xml.sax.Attributes getNonTaglibXmlnsAttributes()
-
setAttributes
public void setAttributes(org.xml.sax.Attributes attrs)
-
getAttributeValue
public java.lang.String getAttributeValue(java.lang.String name)
-
getTextAttribute
public java.lang.String getTextAttribute(java.lang.String name)
Get the attribute that is non request time expression, either from the attribute of the node, or from a jsp:attribute- Parameters:
name
- The name of the attribute- Returns:
- The attribute value
-
getNamedAttributeNode
public Node.NamedAttribute getNamedAttributeNode(java.lang.String name)
Searches all sub-nodes of this node for jsp:attribute standard actions with the given name.This should always be called and only be called for nodes that accept dynamic runtime attribute expressions.
- Parameters:
name
- The name of the attribute- Returns:
- the NamedAttribute node of the matching named attribute, nor null if no such node is found.
-
getNamedAttributeNodes
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.- Returns:
- Possibly empty Node.Nodes object containing any jsp:attribute subnodes of this Node
-
getBody
public Node.Nodes getBody()
-
setBody
public void setBody(Node.Nodes body)
-
getText
public java.lang.String getText()
-
getStart
public Mark getStart()
-
getParent
public Node getParent()
-
getBeginJavaLine
public int getBeginJavaLine()
-
setBeginJavaLine
public void setBeginJavaLine(int begin)
-
getEndJavaLine
public int getEndJavaLine()
-
setEndJavaLine
public void setEndJavaLine(int end)
-
getRoot
public Node.Root getRoot()
-
getInnerClassName
public java.lang.String getInnerClassName()
-
setInnerClassName
public void setInnerClassName(java.lang.String icn)
-
-