wffweb/src/main/java/com/webfirmframework/wffweb/tag/repository/TagRepository.java
public static <T extends AbstractHtml> T findOneTagAssignableToTag(
            final Class<T> tagClass, final AbstractHtml... fromTags)
            throws NullValueException, InvalidTagException {
        return findOneTagAssignableToTag(false, tagClass, fromTags);
    }
public static <T extends AbstractHtml> T findOneTagAssignableToTag(
            final Class<T> tagClass, final AbstractHtml... fromTags)
            throws NullValueException, InvalidTagException {
        return findOneTagAssignableToTag(false, tagClass, fromTags);
    }
Finds and returns the first matching (including from nested tags) tag
(which is assignable to the given tag class). <br>
<br>

<pre>
<code>
Html html = new Html(null) {{
new Head(this) {{
new TitleTag(this){{
new NoTag(this, "some title");
}};
}};
new Body(this, new Id("one")) {{
new Div(this);
}};
}};

TitleTag titleTag = TagRepository.findOneTagAssignableToTagClass(TitleTag.class, html);

System.out.println(titleTag.getTagName());
System.out.println(titleTag.toHtmlString());

//prints

title
&lt;title&gt;some title&lt;/title&gt;

</code>
</pre>

@param tagClass
the class of the tag.
@param fromTags
from which the findings to be done.
@return the first matching tag which is assignable to the given tag
class.
@throws NullValueException
if the {@code tagClass} or
{@code fromTags} is null
@throws InvalidTagException
if the given tag class is NoTag.class
@since 2.1.11
@author WFF