org.apache.wicket.markup
Class MarkupElement

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

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:

Author:
Jonathan Locke
See Also:
MarkupResourceData, RawMarkup, ComponentTag

Constructor Summary
MarkupElement()
          Constructor.
 
Method Summary
 boolean closes(MarkupElement open)
          Gets whether this element closes the given element.
abstract  boolean equalTo(MarkupElement element)
          This is not an implementation of equals because we don't care about hashCodes for MarkupElements yet.
abstract  CharSequence toCharSequence()
           
abstract  String toUserDebugString()
          Gets a string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupElement

public MarkupElement()
Constructor.

Method Detail

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.


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.