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
()
| 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. |
no test coverage detected