com.caucho.jsp.java
Class JspContainerNode

java.lang.Object
  extended by com.caucho.jsp.java.JspNode
      extended by com.caucho.jsp.java.JspContainerNode
Direct Known Subclasses:
GenericTag, JsfNode, JspElement, JspFallback, JspFragmentNode, JspGetProperty, JspRoot, JspSetProperty, JspTop, JspUseBean, JspXmlElement, JstlNode, NullTag

public abstract class JspContainerNode
extends JspNode

A node which can contain other nodes.


Field Summary
protected  java.util.ArrayList<QName> _attributeNames
           
protected  java.util.ArrayList<java.lang.Object> _attributeValues
           
protected  java.util.ArrayList<JspNode> _children
           
protected  boolean _hasJspAttribute
           
 
Fields inherited from class com.caucho.jsp.java.JspNode
_endAttributeLine, _endLine, _filename, _gen, _name, _ns, _parent, _parseState, _sourcePath, _startLine
 
Constructor Summary
JspContainerNode()
           
 
Method Summary
 void addAttribute(QName name, JspAttribute value)
          Adds a JspAttribute attribute.
 void addAttribute(QName name, java.lang.String value)
          Adds an attribute.
protected  void addAttributeChild(JspAttribute attr)
           
 void addChild(JspNode node)
          Adds a child node.
 void addChildEnd(JspNode node)
          Adds a child node after its done initializing.
 JspNode addText(java.lang.String text)
          Adds a text node.
 JspNode findScriptingNode()
          Finds the first scripting node
 void generateChildren(JspJavaWriter out)
          Generates the code for the children.
 void generateChildrenEmpty()
          Generates the code for the children.
 void generateClassEpilogueChildren(JspJavaWriter out)
          generates data for tag state children.
 void generateDeclarationChildren(JspJavaWriter out)
          generates data for declaration children.
 void generatePrologueChildren(JspJavaWriter out)
          generates data for prologue children.
 void generateStatic(JspJavaWriter out)
          Generates static text.
 void generateTagReleaseChildren(JspJavaWriter out)
          generates data for tag state children.
 void generateTagStateChildren(JspJavaWriter out)
          generates data for tag state children.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the named attribute.
 java.util.ArrayList<JspNode> getChildren()
          Returns the children.
 void getStaticText(CharBuffer cb)
          Returns the static text.
 boolean hasChildren()
          Has children.
 boolean hasCustomTag()
          Set true if the node contains a child tag.
 boolean hasScripting()
          True if the node has scripting
 boolean hasScriptingElement()
          True if the node has scripting element (i.e.
 boolean hasTag()
          Set true if the node contains a child tag.
 boolean isChildrenStatic()
          Returns true if the children are static.
 boolean isEmpty()
          Returns true if the node is empty
 boolean isJsfParentRequired()
          True if the jsf-parent setting is required.
 boolean isSingleExpression()
          True if the node has scripting element (i.e.
protected  boolean isWhitespace(java.lang.String text)
           
 void printXmlChildren(WriteStream os)
          Generates the XML text representation for the tag validation.
 
Methods inherited from class com.caucho.jsp.java.JspNode
addNamespace, addNamespaceRec, attributeToBoolean, classToString, convertParameterValue, endAttributes, endElement, error, error, error, escapeJavaString, generate, generateClassEpilogue, generateDeclaration, generateELValue, generateEmpty, generateEndLocation, generateFragment, generateIncludeUrl, generateObject, generateParentTag, generatePrologue, generatePrologueDeclare, generateStartLocation, generateTagRelease, generateTagState, getBodyContent, getCustomTagName, getEndAttributeLine, getEndLine, getFilename, getGenerator, getJsfBodyVar, getJsfVar, getNamespaceContext, getNamespacePrefix, getParent, getParentTagName, getParentTagNode, getQName, getRuntimeAttribute, getSegment, getStartLine, getStaticText, getTag, getTagName, hasDeferredAttribute, hasDeferredAttribute, hasELAttribute, hasELAttribute, hasNamespace, hasNamespace, hasRuntimeAttribute, hasScripting, hasScripting, invokeFragment, isInFragment, isJsp21, isJstl, isPre21Taglib, isSimpleTag, isStatic, loadClass, printJspId, printXml, printXmlAttribute, printXmlOpen, printXmlText, setEndAttributeLocation, setEndLocation, setGenerator, setNamespace, setParent, setParseState, setQName, setStartLocation, toELObject, toString, xmlAttrText, xmlText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_attributeNames

protected java.util.ArrayList<QName> _attributeNames

_attributeValues

protected java.util.ArrayList<java.lang.Object> _attributeValues

_children

protected java.util.ArrayList<JspNode> _children

_hasJspAttribute

protected boolean _hasJspAttribute
Constructor Detail

JspContainerNode

public JspContainerNode()
Method Detail

addAttribute

public void addAttribute(QName name,
                         java.lang.String value)
                  throws JspParseException
Adds an attribute.

Overrides:
addAttribute in class JspNode
Parameters:
name - the name of the attribute.
value - the value of the attribute.
Throws:
JspParseException

addAttribute

public void addAttribute(QName name,
                         JspAttribute value)
                  throws JspParseException
Adds a JspAttribute attribute.

Overrides:
addAttribute in class JspNode
Parameters:
name - the name of the attribute.
value - the value of the attribute.
Throws:
JspParseException

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws JspParseException
Returns the named attribute.

Throws:
JspParseException

addChild

public void addChild(JspNode node)
              throws JspParseException
Adds a child node.

Overrides:
addChild in class JspNode
Throws:
JspParseException

addAttributeChild

protected void addAttributeChild(JspAttribute attr)

addChildEnd

public void addChildEnd(JspNode node)
                 throws JspParseException
Adds a child node after its done initializing.

Overrides:
addChildEnd in class JspNode
Throws:
JspParseException

isJsfParentRequired

public boolean isJsfParentRequired()
True if the jsf-parent setting is required.

Overrides:
isJsfParentRequired in class JspNode

isEmpty

public boolean isEmpty()
Returns true if the node is empty


getStaticText

public void getStaticText(CharBuffer cb)
Returns the static text.

Overrides:
getStaticText in class JspNode

hasCustomTag

public boolean hasCustomTag()
Set true if the node contains a child tag.

Overrides:
hasCustomTag in class JspNode

hasTag

public boolean hasTag()
Set true if the node contains a child tag.

Overrides:
hasTag in class JspNode

addText

public JspNode addText(java.lang.String text)
                throws JspParseException
Adds a text node.

Overrides:
addText in class JspNode
Throws:
JspParseException

isWhitespace

protected boolean isWhitespace(java.lang.String text)

getChildren

public java.util.ArrayList<JspNode> getChildren()
Returns the children.

Overrides:
getChildren in class JspNode

hasChildren

public boolean hasChildren()
Has children.


hasScripting

public boolean hasScripting()
True if the node has scripting

Overrides:
hasScripting in class JspNode

hasScriptingElement

public boolean hasScriptingElement()
True if the node has scripting element (i.e. not counting rtexpr values)

Overrides:
hasScriptingElement in class JspNode

findScriptingNode

public JspNode findScriptingNode()
Finds the first scripting node

Overrides:
findScriptingNode in class JspNode

isSingleExpression

public boolean isSingleExpression()
True if the node has scripting element (i.e. not counting rtexpr values)


isChildrenStatic

public boolean isChildrenStatic()
Returns true if the children are static.


printXmlChildren

public void printXmlChildren(WriteStream os)
                      throws java.io.IOException
Generates the XML text representation for the tag validation.

Parameters:
os - write stream to the generated XML.
Throws:
java.io.IOException

generatePrologueChildren

public void generatePrologueChildren(JspJavaWriter out)
                              throws java.lang.Exception
generates data for prologue children.

Overrides:
generatePrologueChildren in class JspNode
Throws:
java.lang.Exception

generateDeclarationChildren

public void generateDeclarationChildren(JspJavaWriter out)
                                 throws java.io.IOException
generates data for declaration children.

Overrides:
generateDeclarationChildren in class JspNode
Throws:
java.io.IOException

generateTagStateChildren

public void generateTagStateChildren(JspJavaWriter out)
                              throws java.lang.Exception
generates data for tag state children.

Overrides:
generateTagStateChildren in class JspNode
Throws:
java.lang.Exception

generateTagReleaseChildren

public void generateTagReleaseChildren(JspJavaWriter out)
                                throws java.lang.Exception
generates data for tag state children.

Overrides:
generateTagReleaseChildren in class JspNode
Throws:
java.lang.Exception

generateChildren

public void generateChildren(JspJavaWriter out)
                      throws java.lang.Exception
Generates the code for the children.

Overrides:
generateChildren in class JspNode
Parameters:
out - the output writer for the generated java.
Throws:
java.lang.Exception

generateChildrenEmpty

public void generateChildrenEmpty()
                           throws java.lang.Exception
Generates the code for the children.

Overrides:
generateChildrenEmpty in class JspNode
Throws:
java.lang.Exception

generateStatic

public void generateStatic(JspJavaWriter out)
                    throws java.lang.Exception
Generates static text.

Overrides:
generateStatic in class JspNode
Parameters:
out - the output writer for the generated java.
Throws:
java.lang.Exception

generateClassEpilogueChildren

public void generateClassEpilogueChildren(JspJavaWriter out)
                                   throws java.io.IOException
generates data for tag state children.

Overrides:
generateClassEpilogueChildren in class JspNode
Parameters:
out - the output writer for the generated java.
Throws:
java.io.IOException