Class MarkupElement

java.lang.Object
org.apache.wicket.markup.MarkupElement
Direct Known Subclasses:
ComponentTag, HtmlSpecialTag, RawMarkup

public abstract class MarkupElement extends Object
Base class for different kinds of markup elements. Markup elements are held in a Markup container object.

Wicket divides markup like (x)html, wml etc. into two types of MarkupElements:

  • ComponentTag, which represents a "significant" markup tag (meaning that the tag has some meaning to Wicket)
  • RawMarkup, which is a section of unparsed markup having no meaning to Wicket.
Author:
Jonathan Locke
See Also:
  • Constructor Details

  • Method Details

    • closes

      public boolean closes(MarkupElement open)
      Gets whether this element closes the given element.
      Parameters:
      open - The open tag
      Returns:
      True if this markup element closes the given open tag
    • equalTo

      public abstract boolean equalTo(MarkupElement element)
      This is not an implementation of equals because we don't care about hashCodes for MarkupElements yet. Also, this method only compares the namespace, name and attributes of the given MarkupElements.
      Parameters:
      element - The markup element to compare with
      Returns:
      True if the other element equals this one
    • toCharSequence

      public abstract CharSequence toCharSequence()
      Returns:
      Gets the charsequence representation of this element
    • toUserDebugString

      public abstract String toUserDebugString()
      Gets a string representation.
      Returns:
      A string representation suitable for displaying to the user when something goes wrong.