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

Method getNamedAttributeNode

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

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. @param name The name of the attribute @return the NamedAttribute node of the matching named a

(String name)

Source from the content-addressed store, hash-verified

288 * @return the NamedAttribute node of the matching named attribute, nor null if no such node is found.
289 */
290 public NamedAttribute getNamedAttributeNode(String name) {
291 NamedAttribute result = null;
292
293 // Look for the attribute in NamedAttribute children
294 Nodes nodes = getNamedAttributeNodes();
295 int numChildNodes = nodes.size();
296 for (int i = 0; i < numChildNodes; i++) {
297 NamedAttribute na = (NamedAttribute) nodes.getNode(i);
298 boolean found;
299 int index = name.indexOf(':');
300 if (index != -1) {
301 // qualified name
302 found = na.getName().equals(name);
303 } else {
304 found = na.getLocalName().equals(name);
305 }
306 if (found) {
307 result = na;
308 break;
309 }
310 }
311
312 return result;
313 }
314
315 /**
316 * Searches all subnodes of this node for jsp:attribute standard actions, and returns that set of nodes as a

Callers 6

getTextAttributeMethod · 0.95
visitMethod · 0.45
getJspAttributeMethod · 0.45
attributeValueMethod · 0.45
visitMethod · 0.45
evaluateAttributeMethod · 0.45

Calls 7

sizeMethod · 0.95
getNodeMethod · 0.95
getNameMethod · 0.95
getLocalNameMethod · 0.95
equalsMethod · 0.65
indexOfMethod · 0.45

Tested by

no test coverage detected