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.
  • Enum Constant Details

    • 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>
      Unlike self closing tags a NORMAL tag must be explicitly closed.
    • SELF

      public static final MarkupBuilder.TagClosingPolicy SELF
      The tag is always a self closing tag.
      • <tag/>
      When a tag has this policy the tag can be implicitly closed by 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/>
  • Constructor Details

    • TagClosingPolicy

      private TagClosingPolicy()
  • Method Details

    • values

      public static MarkupBuilder.TagClosingPolicy[] 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

      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 name
      NullPointerException - 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>).