MCPcopy Index your code
hub / github.com/apache/tomcat / getNamedAttributeNodes

Method getNamedAttributeNodes

java/org/apache/jasper/compiler/Node.java:321–347  ·  view source on GitHub ↗

Searches all subnodes of this node for jsp:attribute standard actions, and returns that set of nodes as a Node.Nodes object. @return Possibly empty Node.Nodes object containing any jsp:attribute subnodes of this Node

()

Source from the content-addressed store, hash-verified

319 * @return Possibly empty Node.Nodes object containing any jsp:attribute subnodes of this Node
320 */
321 public Node.Nodes getNamedAttributeNodes() {
322
323 if (namedAttributeNodes != null) {
324 return namedAttributeNodes;
325 }
326
327 Node.Nodes result = new Node.Nodes();
328
329 // Look for the attribute in NamedAttribute children
330 Nodes nodes = getBody();
331 if (nodes != null) {
332 int numChildNodes = nodes.size();
333 for (int i = 0; i < numChildNodes; i++) {
334 Node n = nodes.getNode(i);
335 if (n instanceof NamedAttribute) {
336 result.add(n);
337 } else if (!(n instanceof Comment)) {
338 // Nothing can come before jsp:attribute, and only
339 // jsp:body can come after it.
340 break;
341 }
342 }
343 }
344
345 namedAttributeNodes = result;
346 return result;
347 }
348
349 /**
350 * Returns the body of this node.

Callers 5

getNamedAttributeNodeMethod · 0.95
visitMethod · 0.80
checkNamedAttributesMethod · 0.80
visitMethod · 0.80
visitMethod · 0.80

Calls 4

getBodyMethod · 0.95
sizeMethod · 0.95
getNodeMethod · 0.95
addMethod · 0.95

Tested by

no test coverage detected