Package com.googlecode.jatl
Enum MarkupBuilder.TagClosingPolicy
- java.lang.Object
-
- java.lang.Enum<MarkupBuilder.TagClosingPolicy>
-
- com.googlecode.jatl.MarkupBuilder.TagClosingPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<MarkupBuilder.TagClosingPolicy>
- Enclosing class:
- MarkupBuilder<T>
public static enum MarkupBuilder.TagClosingPolicy extends Enum<MarkupBuilder.TagClosingPolicy>
Policy for how tags should be closed.- Author:
- adamgent
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAlwaysSelfClosing()
boolean
isPairClosing()
boolean
isSelfClosing()
static MarkupBuilder.TagClosingPolicy
valueOf(String name)
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 Detail
-
NORMAL
public static final MarkupBuilder.TagClosingPolicy 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
public static final MarkupBuilder.TagClosingPolicy SELF
The tag is always a self closing tag.<tag/>
starting the next tag
:start("self",TagClosingPolicy.SELF).start("next");
Result:<self/> <next> ...
-
PAIR
public static final MarkupBuilder.TagClosingPolicy PAIR
The tag is always closed with a matching closing tag regardless if there is no child tag or text.<tag/>
-
-
Method Detail
-
values
public static MarkupBuilder.TagClosingPolicy[] 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 (MarkupBuilder.TagClosingPolicy c : MarkupBuilder.TagClosingPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MarkupBuilder.TagClosingPolicy 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 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>
).
-
-