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