MCPcopy Create free account
hub / github.com/apache/tomcat / getTag

Method getTag

java/jakarta/servlet/jsp/tagext/TagLibraryInfo.java:128–141  ·  view source on GitHub ↗

Get the TagInfo for a given tag name, looking through all the tags in this tag library. @param shortname The short name (no prefix) of the tag @return the TagInfo for the tag with the specified short name, or null if no such tag is found

(String shortname)

Source from the content-addressed store, hash-verified

126 * @return the TagInfo for the tag with the specified short name, or null if no such tag is found
127 */
128 public TagInfo getTag(String shortname) {
129 TagInfo[] tags = getTags();
130
131 if (tags == null || tags.length == 0 || shortname == null) {
132 return null;
133 }
134
135 for (TagInfo tag : tags) {
136 if (shortname.equals(tag.getTagName())) {
137 return tag;
138 }
139 }
140 return null;
141 }
142
143 /**
144 * Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.

Callers 2

parseCustomActionMethod · 0.95
parseCustomTagMethod · 0.95

Calls 3

getTagsMethod · 0.95
getTagNameMethod · 0.80
equalsMethod · 0.65

Tested by

no test coverage detected