Enum ErrorType

  • All Implemented Interfaces:
    Serializable, Comparable<ErrorType>

    public enum ErrorType
    extends Enum<ErrorType>
    Possible error codes (read messages) that cleaner uses to inform clients about reasons/actions that modification involves.
    Author:
    Konstantin Burov (aectann@gmail.com)
    • Enum Constant Detail

      • FatalTagMissing

        public static final ErrorType FatalTagMissing
        Tag which existence is critical for the current is missing. Most likely, current tag was pruned. Unlike the RequiredParentMissing this reports the problem when cleaner removed the tag instead of creating as parent. See TagInfo for more detailed description of fatal and required tags.

        Example:

        • <option> tag without parent select
        • <tr> tag without parent <table>
        • ...
      • NotAllowedTag

        public static final ErrorType NotAllowedTag
        The tag wasn't found on list of allowed tags, thus it was removed.
      • RequiredParentMissing

        public static final ErrorType RequiredParentMissing
        Missing parent tag was added for current (i.e. tbody for tr).
      • UnclosedTag

        public static final ErrorType UnclosedTag
        No matching close token was found for the open tag. Tag was closed automatically.

        Example:

        <p>Some text..

        Unclosed <p> tag.

      • UniqueTagDuplicated

        public static final ErrorType UniqueTagDuplicated
        Second instance of an unique tag was found, most likely it was removed.

        Example:

         <head>
            <title>Some text</title>
            <title>Some more text</title>
         </head>
         

      • Deprecated

        public static final ErrorType Deprecated
        The tag was deprecated and current cleaner mode doesn't allows this. The tag was removed.

        Example:

        • <u>
        • <s>
        • <srtike>
        • ....
      • UnpermittedChild

        public static final ErrorType UnpermittedChild
        This tag have bad child that shouldn't be here. Thus the tag is closed automatically to avoid such inclusion.

        Example:

        <p>Some text <table>...</table><p>

        <table> is not allowed to be child of <p>, thus <p> is closed before the <table>

      • Unknown

        public static final ErrorType Unknown
        The tag is unknown and current cleaner mode doesn't allows this. The tag was removed.

        Example:

        • <any>
        • <tag>
        • ....
    • Method Detail

      • values

        public static ErrorType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ErrorType c : ErrorType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ErrorType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null