类 TagUtils

    • 构造器详细资料

    • 方法详细资料

      • hasAncestorOfType

        public static boolean hasAncestorOfType​(Tag tag,
                                                Class<?> ancestorTagClass)
        Determine whether the supplied Tag has any ancestor tag of the supplied type.
        参数:
        tag - the tag whose ancestors are to be checked
        ancestorTagClass - the ancestor Class being searched for
        返回:
        true if the supplied Tag has any ancestor tag of the supplied type
        抛出:
        IllegalArgumentException - if either of the supplied arguments is null; or if the supplied ancestorTagClass is not type-assignable to the Tag class
      • assertHasAncestorOfType

        public static void assertHasAncestorOfType​(Tag tag,
                                                   Class<?> ancestorTagClass,
                                                   String tagName,
                                                   String ancestorTagName)
        Determine whether the supplied Tag has any ancestor tag of the supplied type, throwing an IllegalStateException if not.
        参数:
        tag - the tag whose ancestors are to be checked
        ancestorTagClass - the ancestor Class being searched for
        tagName - the name of the tag; for example 'option'
        ancestorTagName - the name of the ancestor tag; for example 'select'
        抛出:
        IllegalStateException - if the supplied tag does not have a tag of the supplied parentTagClass as an ancestor
        IllegalArgumentException - if any of the supplied arguments is null, or in the case of the String-typed arguments, is composed wholly of whitespace; or if the supplied ancestorTagClass is not type-assignable to the Tag class
        另请参阅:
        hasAncestorOfType(javax.servlet.jsp.tagext.Tag, Class)