Package com.googlecode.jatl
Enum MarkupBuilder.TagClosingPolicy
- All Implemented Interfaces:
Serializable
,Comparable<MarkupBuilder.TagClosingPolicy>
- Enclosing class:
MarkupBuilder<T>
Policy for how tags should be closed.
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final boolean
final boolean
Returns the enum constant of this type with the specified name.static MarkupBuilder.TagClosingPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NORMAL
The tag can either be closed with a matching closing tag or self closing. It will be self closing if the tag contains no child tags or text.<tag/>
</tag>
self closing
tags aNORMAL
tag must be explicitly closed. -
SELF
The tag is always a self closing tag.<tag/>
starting the next tag
:start("self",TagClosingPolicy.SELF).start("next");
Result:<self/> <next> ...
-
PAIR
The tag is always closed with a matching closing tag regardless if there is no child tag or text.<tag/>
-
-
Constructor Details
-
TagClosingPolicy
private TagClosingPolicy()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
isAlwaysSelfClosing
public final boolean isAlwaysSelfClosing() -
isSelfClosing
public final boolean isSelfClosing()- Returns:
true
if the tag is allowed to self close.
-
isPairClosing
public final boolean isPairClosing()- Returns:
true
if the tag is allowed to close with a matching end tag (</tag>
).
-