Package org.apache.maven.doxia.markup
Class HtmlTag
- java.lang.Object
-
- org.apache.maven.doxia.markup.HtmlTag
-
public final class HtmlTag extends java.lang.ObjectAn HTML tag name together with the one property Doxia reads from it: whether a start tag may be preceded by a line break. It replacesjavax.swing.text.html.HTML.Tagin the sink API, which carries an HTML 4 table Doxia has outgrown.The block values of the known tags are those the
HtmlMarkupconstants report today, copied unchanged so that no generated site's whitespace moves. Several of them are wrong for HTML5 —section,articleandfigureare not treated as block, whilemenuandtitleare — and correcting them is a separate change with its own before-and-after site comparison.- Since:
- 2.2.0
-
-
Constructor Summary
Constructors Constructor Description HtmlTag(java.lang.String name, boolean block)Constructs a tag.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetName()Returns the tag name.inthashCode()booleanisBlock()Returns whether a start tag may be preceded by a line break.java.lang.StringtoString()static HtmlTagvalueOf(java.lang.String name)Returns the tag of the given name known to Doxia.
-
-
-
Method Detail
-
valueOf
public static HtmlTag valueOf(java.lang.String name)
Returns the tag of the given name known to Doxia.- Parameters:
name- a tag name, not null.- Returns:
- the tag, or null if Doxia declares no tag of that name.
-
getName
public java.lang.String getName()
Returns the tag name.- Returns:
- the tag name, never null.
-
isBlock
public boolean isBlock()
Returns whether a start tag may be preceded by a line break.- Returns:
- true if the tag is a block-level tag.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-