Enum Class ErrorType

java.lang.Object
java.lang.Enum<ErrorType>
org.htmlcleaner.audit.ErrorType
All Implemented Interfaces:
Serializable, Comparable<ErrorType>, Constable

public enum ErrorType extends Enum<ErrorType>
Possible error codes (read messages) that cleaner uses to inform clients about reasons/actions that modification involves.
  • Enum Constant Details

    • 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>
      • ....
  • Constructor Details

    • ErrorType

      private ErrorType()
  • Method Details

    • values

      public static ErrorType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null