Class Node

    • Field Detail

      • attrs

        protected org.xml.sax.Attributes attrs
        The attributes for this node.
      • taglibAttrs

        protected org.xml.sax.Attributes taglibAttrs
        The xmlns attributes that represent tag libraries (only in XML syntax).
      • nonTaglibXmlnsAttrs

        protected org.xml.sax.Attributes nonTaglibXmlnsAttrs
        The xmlns attributes that do not represent tag libraries (only in XML syntax).
      • body

        protected Node.Nodes body
        The body of this node.
      • text

        protected java.lang.String text
        The text content associated with this node.
      • startMark

        protected Mark startMark
        The location in the source file where this node begins.
      • beginJavaLine

        protected int beginJavaLine
        The starting line number in the generated Java code.
      • endJavaLine

        protected int endJavaLine
        The ending line number in the generated Java code.
      • parent

        protected Node parent
        The parent node in the parse tree.
      • namedAttributeNodes

        protected Node.Nodes namedAttributeNodes
        Cached named attribute nodes for performance.
      • qName

        protected java.lang.String qName
        The qualified name of this node.
      • localName

        protected java.lang.String localName
        The local name of this node.
      • innerClassName

        protected java.lang.String innerClassName
        The name of the inner class to which the codes for this node and its body are generated. For instance, for <jsp:body> in foo.jsp, this is "foo_jspHelper". This is primarily used for communicating such info from Generator to Smap generator.
    • Method Detail

      • getQName

        public java.lang.String getQName()
        Returns the qualified name of this node.
        Returns:
        The qualified name
      • getLocalName

        public java.lang.String getLocalName()
        Returns the local name of this node.
        Returns:
        The local name
      • getAttributes

        public org.xml.sax.Attributes getAttributes()
        Gets this Node's attributes.

        In the case of a Node parsed from standard syntax, this method returns all the Node's attributes.

        In the case of a Node parsed from XML syntax, this method returns only those attributes whose name does not start with xmlns.

        Returns:
        The attributes
      • getTaglibAttributes

        public org.xml.sax.Attributes getTaglibAttributes()
        Gets this Node's xmlns attributes that represent tag libraries (only meaningful for Nodes parsed from XML syntax).
        Returns:
        The taglib attributes
      • getNonTaglibXmlnsAttributes

        public org.xml.sax.Attributes getNonTaglibXmlnsAttributes()
        Gets this Node's xmlns attributes that do not represent tag libraries (only meaningful for Nodes parsed from XML syntax).
        Returns:
        The non-taglib xmlns attributes
      • setAttributes

        public void setAttributes​(org.xml.sax.Attributes attrs)
        Sets the attributes for this node.
        Parameters:
        attrs - The attributes to set
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String name)
        Returns the value of the attribute with the given name.
        Parameters:
        name - The name of the attribute
        Returns:
        The attribute value, or null if not found
      • 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()
        Returns the body of this node.
        Returns:
        The body nodes
      • setBody

        public void setBody​(Node.Nodes body)
        Sets the body of this node.
        Parameters:
        body - The body nodes
      • getText

        public java.lang.String getText()
        Returns the text content of this node.
        Returns:
        The text content
      • getStart

        public Mark getStart()
        Returns the start mark (location) of this node.
        Returns:
        The start mark
      • getParent

        public Node getParent()
        Returns the parent node.
        Returns:
        The parent node
      • getBeginJavaLine

        public int getBeginJavaLine()
        Returns the starting line number in the generated Java code.
        Returns:
        The starting Java line number
      • setBeginJavaLine

        public void setBeginJavaLine​(int begin)
        Sets the starting line number in the generated Java code.
        Parameters:
        begin - The starting Java line number
      • getEndJavaLine

        public int getEndJavaLine()
        Returns the ending line number in the generated Java code.
        Returns:
        The ending Java line number
      • setEndJavaLine

        public void setEndJavaLine​(int end)
        Sets the ending line number in the generated Java code.
        Parameters:
        end - The ending Java line number
      • getRoot

        public Node.Root getRoot()
        Returns the root node of the parse tree.
        Returns:
        The root node
      • getInnerClassName

        public java.lang.String getInnerClassName()
        Returns the name of the inner class for this node.
        Returns:
        The inner class name
      • setInnerClassName

        public void setInnerClassName​(java.lang.String icn)
        Sets the name of the inner class for this node.
        Parameters:
        icn - The inner class name