Constructors Summary |
---|
public Node()Zero-arg Constructor.
this.isDummy = true;
|
public Node(Mark start, Node parent)Constructor.
this.startMark = start;
this.isDummy = (start == null);
addToParent(parent);
|
public Node(String qName, String localName, Mark start, Node parent)Constructor.
this.qName = qName;
this.localName = localName;
this.startMark = start;
this.isDummy = (start == null);
addToParent(parent);
|
public Node(String qName, String localName, Attributes attrs, Mark start, Node parent)Constructor for Nodes parsed from standard syntax.
this.qName = qName;
this.localName = localName;
this.attrs = attrs;
this.startMark = start;
this.isDummy = (start == null);
addToParent(parent);
|
public Node(String qName, String localName, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent)Constructor for Nodes parsed from XML syntax.
this.qName = qName;
this.localName = localName;
this.attrs = attrs;
this.nonTaglibXmlnsAttrs = nonTaglibXmlnsAttrs;
this.taglibAttrs = taglibAttrs;
this.startMark = start;
this.isDummy = (start == null);
addToParent(parent);
|
public Node(String qName, String localName, String text, Mark start, Node parent)
this.qName = qName;
this.localName = localName;
this.text = text;
this.startMark = start;
this.isDummy = (start == null);
addToParent(parent);
|
Methods Summary |
---|
abstract void | accept(org.apache.jasper.compiler.Node$Visitor v)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.
|
private void | addToParent(org.apache.jasper.compiler.Node parent)
if (parent != null) {
this.parent = parent;
Nodes parentBody = parent.getBody();
if (parentBody == null) {
parentBody = new Nodes();
parent.setBody(parentBody);
}
parentBody.add(this);
}
|
public java.lang.String | getAttributeValue(java.lang.String name)
return (attrs == null) ? null : attrs.getValue(name);
|
public org.xml.sax.Attributes | getAttributes()
return this.attrs;
|
public int | getBeginJavaLine()
return beginJavaLine;
|
public org.apache.jasper.compiler.Node$Nodes | getBody()
return body;
|
public int | getEndJavaLine()
return endJavaLine;
|
public java.lang.String | getInnerClassName()
return innerClassName;
|
public java.lang.String | getLocalName()
return this.localName;
|
public org.apache.jasper.compiler.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.
NamedAttribute result = null;
// Look for the attribute in NamedAttribute children
Nodes nodes = getNamedAttributeNodes();
int numChildNodes = nodes.size();
for (int i = 0; i < numChildNodes; i++) {
NamedAttribute na = (NamedAttribute) nodes.getNode(i);
boolean found = false;
int index = name.indexOf(':");
if (index != -1) {
// qualified name
found = na.getName().equals(name);
} else {
found = na.getLocalName().equals(name);
}
if (found) {
result = na;
break;
}
}
return result;
|
public org.apache.jasper.compiler.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.
if (namedAttributeNodes != null) {
return namedAttributeNodes;
}
Node.Nodes result = new Node.Nodes();
// Look for the attribute in NamedAttribute children
Nodes nodes = getBody();
if (nodes != null) {
int numChildNodes = nodes.size();
for (int i = 0; i < numChildNodes; i++) {
Node n = nodes.getNode(i);
if (n instanceof NamedAttribute) {
result.add(n);
} else if (!(n instanceof Comment)) {
// Nothing can come before jsp:attribute, and only
// jsp:body can come after it.
break;
}
}
}
namedAttributeNodes = result;
return result;
|
public org.xml.sax.Attributes | getNonTaglibXmlnsAttributes()
return this.nonTaglibXmlnsAttrs;
|
public org.apache.jasper.compiler.Node | getParent()
return parent;
|
public java.lang.String | getQName()
return this.qName;
|
public org.apache.jasper.compiler.Node$Root | getRoot()
Node n = this;
while (!(n instanceof Node.Root)) {
n = n.getParent();
}
return (Node.Root) n;
|
public Mark | getStart()
return startMark;
|
public org.xml.sax.Attributes | getTaglibAttributes()
return this.taglibAttrs;
|
public java.lang.String | getText()
return text;
|
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
String attr = getAttributeValue(name);
if (attr != null) {
return attr;
}
NamedAttribute namedAttribute = getNamedAttributeNode(name);
if (namedAttribute == null) {
return null;
}
return namedAttribute.getText();
|
public boolean | isDummy()
return isDummy;
|
public void | setAttributes(org.xml.sax.Attributes attrs)
this.attrs = attrs;
|
public void | setBeginJavaLine(int begin)
beginJavaLine = begin;
|
public void | setBody(org.apache.jasper.compiler.Node$Nodes body)
this.body = body;
|
public void | setEndJavaLine(int end)
endJavaLine = end;
|
public void | setInnerClassName(java.lang.String icn)
innerClassName = icn;
|