org.apache.jasper.compiler
Class Node.CustomTag

java.lang.Object
  extended byorg.apache.jasper.compiler.Node
      extended byorg.apache.jasper.compiler.Node.CustomTag
All Implemented Interfaces:
TagConstants
Enclosing class:
org.apache.jasper.compiler.Node

public static class Node.CustomTag
extends org.apache.jasper.compiler.Node

Represents a custom tag


Nested Class Summary
static class Node.AttributeDirective
          Represents an attribute directive
static 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.Comment
          Represents a Jsp comment Comments are kept for completeness.
static class Node.CustomTag
          Represents a custom tag
static class Node.Declaration
          Represents a declaration
static class Node.DoBodyAction
          Represents a tag file action
static class Node.ELExpression
          Represents an EL expression.
static class Node.Expression
          Represents an expression.
static class Node.FallBackAction
          Represents a fallback action
static class Node.ForwardAction
          Represents a forward action
static class Node.GetProperty
          Represents a getProperty action
static class Node.IncludeAction
          Represents an include action
static class Node.IncludeDirective
          Represents an include directive
static class Node.InvokeAction
          Represents a tag file action
static 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 .
static class Node.JspOutput
          Represents a .
static class Node.JspRoot
          Represents the root of a Jsp document (XML syntax)
static class Node.JspText
          Represents the body of a <jsp:text> element
static 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 directive
static class Node.ParamAction
          Represents a param action
static class Node.ParamsAction
          Represents a params action
static class Node.PlugIn
          Represents a plugin action
static class Node.Root
          Represents the root of a Jsp page or Jsp document
static class Node.ScriptingElement
          Represents an expression, declaration, or scriptlet
static class Node.Scriptlet
          Represents a scriptlet
static class Node.SetProperty
          Represents a setProperty action
static class Node.TagDirective
          Represents a tag directive
static class Node.TaglibDirective
          Represents a custom taglib directive
static class Node.TemplateText
          Represents a template text string
static class Node.UninterpretedTag
          Represents an uninterpreted tag, from a Jsp document
static class Node.UseBean
          Represents a useBean action
static class Node.VariableDirective
          Represents a variable directive
static class Node.Visitor
          A visitor class for visiting the node.
 
Field Summary
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  org.apache.jasper.compiler.Node parent
           
protected  java.lang.String qName
           
protected  org.apache.jasper.compiler.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
 
Constructor Summary
Node.CustomTag(java.lang.String qName, java.lang.String prefix, java.lang.String localName, java.lang.String uri, org.xml.sax.Attributes attrs, org.xml.sax.Attributes nonTaglibXmlnsAttrs, org.xml.sax.Attributes taglibAttrs, org.apache.jasper.compiler.Mark start, org.apache.jasper.compiler.Node parent, javax.servlet.jsp.tagext.TagFileInfo tagFileInfo)
           
Node.CustomTag(java.lang.String qName, java.lang.String prefix, java.lang.String localName, java.lang.String uri, org.xml.sax.Attributes attrs, org.xml.sax.Attributes nonTaglibXmlnsAttrs, org.xml.sax.Attributes taglibAttrs, org.apache.jasper.compiler.Mark start, org.apache.jasper.compiler.Node parent, javax.servlet.jsp.tagext.TagInfo tagInfo, java.lang.Class tagHandlerClass)
           
Node.CustomTag(java.lang.String qName, java.lang.String prefix, java.lang.String localName, java.lang.String uri, org.xml.sax.Attributes attrs, org.apache.jasper.compiler.Mark start, org.apache.jasper.compiler.Node parent, javax.servlet.jsp.tagext.TagFileInfo tagFileInfo)
           
Node.CustomTag(java.lang.String qName, java.lang.String prefix, java.lang.String localName, java.lang.String uri, org.xml.sax.Attributes attrs, org.apache.jasper.compiler.Mark start, org.apache.jasper.compiler.Node parent, javax.servlet.jsp.tagext.TagInfo tagInfo, java.lang.Class tagHandlerClass)
           
 
Method Summary
 void accept(Node.Visitor v)
           
 boolean checkIfAttributeIsJspFragment(java.lang.String name)
          Checks to see if the attribute of the given name is of type JspFragment.
 Node.Nodes getAtETag()
           
 Node.Nodes getAtSTag()
           
 org.xml.sax.Attributes getAttributes()
           
 java.lang.String getAttributeValue(java.lang.String name)
           
 int getBeginJavaLine()
           
 Node.Nodes getBody()
           
 Node.ChildInfo getChildInfo()
           
 int getCustomNestingLevel()
           
 Node.CustomTag getCustomTagParent()
           
 int getEndJavaLine()
           
 java.lang.String getInnerClassName()
           
 Node.JspAttribute[] getJspAttributes()
           
 java.lang.String getLocalName()
           
 Node.NamedAttribute getNamedAttributeNode(java.lang.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.
 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()
           
 java.lang.Integer getNumCount()
           
 org.apache.jasper.compiler.Node getParent()
           
 java.lang.String getPrefix()
           
 java.lang.String getQName()
           
 Node.Root getRoot()
           
 java.util.Vector getScriptingVars(int scope)
           
 org.apache.jasper.compiler.Mark getStart()
           
 javax.servlet.jsp.tagext.TagData getTagData()
           
 javax.servlet.jsp.tagext.TagFileInfo getTagFileInfo()
           
 java.lang.Class getTagHandlerClass()
           
 java.lang.String getTagHandlerPoolName()
           
 javax.servlet.jsp.tagext.TagInfo getTagInfo()
           
 org.xml.sax.Attributes getTaglibAttributes()
           
 TagPluginContext getTagPluginContext()
           
 javax.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos()
           
 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:attrbute
 java.lang.String getURI()
           
 javax.servlet.jsp.tagext.VariableInfo[] getVariableInfos()
           
 boolean hasEmptyBody()
          Returns true if this custom action has an empty body, and false otherwise.
 boolean implementsBodyTag()
           
 boolean implementsDynamicAttributes()
           
 boolean implementsIterationTag()
           
 boolean implementsSimpleTag()
           
 boolean implementsTryCatchFinally()
           
 boolean isDummy()
           
 boolean isTagFile()
           
 void setAtETag(Node.Nodes eTag)
           
 void setAtSTag(Node.Nodes sTag)
           
 void setAttributes(org.xml.sax.Attributes attrs)
           
 void setBeginJavaLine(int begin)
           
 void setBody(Node.Nodes body)
           
 void setCustomTagParent(Node.CustomTag n)
           
 void setEndJavaLine(int end)
           
 void setInnerClassName(java.lang.String icn)
           
 void setJspAttributes(Node.JspAttribute[] jspAttrs)
           
 void setNumCount(java.lang.Integer count)
           
 void setScriptingVars(java.util.Vector vec, int scope)
           
 void setTagData(javax.servlet.jsp.tagext.TagData tagData)
           
 void setTagHandlerClass(java.lang.Class hc)
           
 void setTagHandlerPoolName(java.lang.String s)
           
 void setTagPluginContext(TagPluginContext tagPluginContext)
           
 void setUseTagPlugin(boolean use)
           
 boolean useTagPlugin()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 org.apache.jasper.compiler.Mark startMark

beginJavaLine

protected int beginJavaLine

endJavaLine

protected int endJavaLine

parent

protected org.apache.jasper.compiler.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
Constructor Detail

Node.CustomTag

public Node.CustomTag(java.lang.String qName,
                      java.lang.String prefix,
                      java.lang.String localName,
                      java.lang.String uri,
                      org.xml.sax.Attributes attrs,
                      org.apache.jasper.compiler.Mark start,
                      org.apache.jasper.compiler.Node parent,
                      javax.servlet.jsp.tagext.TagInfo tagInfo,
                      java.lang.Class tagHandlerClass)

Node.CustomTag

public Node.CustomTag(java.lang.String qName,
                      java.lang.String prefix,
                      java.lang.String localName,
                      java.lang.String uri,
                      org.xml.sax.Attributes attrs,
                      org.xml.sax.Attributes nonTaglibXmlnsAttrs,
                      org.xml.sax.Attributes taglibAttrs,
                      org.apache.jasper.compiler.Mark start,
                      org.apache.jasper.compiler.Node parent,
                      javax.servlet.jsp.tagext.TagInfo tagInfo,
                      java.lang.Class tagHandlerClass)

Node.CustomTag

public Node.CustomTag(java.lang.String qName,
                      java.lang.String prefix,
                      java.lang.String localName,
                      java.lang.String uri,
                      org.xml.sax.Attributes attrs,
                      org.apache.jasper.compiler.Mark start,
                      org.apache.jasper.compiler.Node parent,
                      javax.servlet.jsp.tagext.TagFileInfo tagFileInfo)

Node.CustomTag

public Node.CustomTag(java.lang.String qName,
                      java.lang.String prefix,
                      java.lang.String localName,
                      java.lang.String uri,
                      org.xml.sax.Attributes attrs,
                      org.xml.sax.Attributes nonTaglibXmlnsAttrs,
                      org.xml.sax.Attributes taglibAttrs,
                      org.apache.jasper.compiler.Mark start,
                      org.apache.jasper.compiler.Node parent,
                      javax.servlet.jsp.tagext.TagFileInfo tagFileInfo)
Method Detail

accept

public void accept(Node.Visitor v)
            throws JasperException
Parameters:
v - The visitor class
Throws:
JasperException

getURI

public java.lang.String getURI()
Returns:
The URI namespace that this custom action belongs to

getPrefix

public java.lang.String getPrefix()
Returns:
The tag prefix

setJspAttributes

public void setJspAttributes(Node.JspAttribute[] jspAttrs)

getJspAttributes

public Node.JspAttribute[] getJspAttributes()

getChildInfo

public Node.ChildInfo getChildInfo()

setTagData

public void setTagData(javax.servlet.jsp.tagext.TagData tagData)

getTagData

public javax.servlet.jsp.tagext.TagData getTagData()

setTagHandlerPoolName

public void setTagHandlerPoolName(java.lang.String s)

getTagHandlerPoolName

public java.lang.String getTagHandlerPoolName()

getTagInfo

public javax.servlet.jsp.tagext.TagInfo getTagInfo()

getTagFileInfo

public javax.servlet.jsp.tagext.TagFileInfo getTagFileInfo()

isTagFile

public boolean isTagFile()

getTagHandlerClass

public java.lang.Class getTagHandlerClass()

setTagHandlerClass

public void setTagHandlerClass(java.lang.Class hc)

implementsIterationTag

public boolean implementsIterationTag()

implementsBodyTag

public boolean implementsBodyTag()

implementsTryCatchFinally

public boolean implementsTryCatchFinally()

implementsSimpleTag

public boolean implementsSimpleTag()

implementsDynamicAttributes

public boolean implementsDynamicAttributes()

getTagVariableInfos

public javax.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos()

getVariableInfos

public javax.servlet.jsp.tagext.VariableInfo[] getVariableInfos()

setCustomTagParent

public void setCustomTagParent(Node.CustomTag n)

getCustomTagParent

public Node.CustomTag getCustomTagParent()

setNumCount

public void setNumCount(java.lang.Integer count)

getNumCount

public java.lang.Integer getNumCount()

setScriptingVars

public void setScriptingVars(java.util.Vector vec,
                             int scope)

getScriptingVars

public java.util.Vector getScriptingVars(int scope)

getCustomNestingLevel

public int getCustomNestingLevel()

checkIfAttributeIsJspFragment

public boolean checkIfAttributeIsJspFragment(java.lang.String name)
Checks to see if the attribute of the given name is of type JspFragment.


setUseTagPlugin

public void setUseTagPlugin(boolean use)

useTagPlugin

public boolean useTagPlugin()

setTagPluginContext

public void setTagPluginContext(TagPluginContext tagPluginContext)

getTagPluginContext

public TagPluginContext getTagPluginContext()

setAtSTag

public void setAtSTag(Node.Nodes sTag)

getAtSTag

public Node.Nodes getAtSTag()

setAtETag

public void setAtETag(Node.Nodes eTag)

getAtETag

public Node.Nodes getAtETag()

hasEmptyBody

public boolean hasEmptyBody()
Returns true if this custom action has an empty body, and false otherwise. A custom action is considered to have an empty body if the following holds true: - getBody() returns null, or - all immediate children are jsp:attribute actions, or - the action's jsp:body is empty.


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:attrbute


getNamedAttributeNode

public Node.NamedAttribute getNamedAttributeNode(java.lang.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.


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 org.apache.jasper.compiler.Mark getStart()

getParent

public org.apache.jasper.compiler.Node getParent()

getBeginJavaLine

public int getBeginJavaLine()

setBeginJavaLine

public void setBeginJavaLine(int begin)

getEndJavaLine

public int getEndJavaLine()

setEndJavaLine

public void setEndJavaLine(int end)

isDummy

public boolean isDummy()

getRoot

public Node.Root getRoot()

getInnerClassName

public java.lang.String getInnerClassName()

setInnerClassName

public void setInnerClassName(java.lang.String icn)


Copyright © 2000 Apache Software Foundation. All Rights Reserved.