au.id.jericho.lib.html
Class EndTagType
public abstract class EndTagType
Defines the syntax for an end tag type.
An end tag type is a
TagType
that
starts with the characters '
</
'.
The singleton instances of all the
standard end tag types are available in this class as static
fields.
Because all
EndTagType
instaces must be singletons, the '
==
' operator can be used to test for a particular tag type
instead of the
equals(Object)
method.
EndTagType(String description, String startDelimiter, String closingDelimiter, boolean isServerTag) - Constructs a new
EndTagType object with the specified properties.
|
constructTagAt , deregister , getClosingDelimiter , getDescription , getNamePrefix , getRegisteredTagTypes , getStartDelimiter , getTagTypesIgnoringEnclosedMarkup , isServerTag , isValidPosition , register , setTagTypesIgnoringEnclosedMarkup , tagEncloses , toString |
NORMAL
public static final EndTagType NORMAL
The tag type given to a normal HTML or XML
end tag (
</name>
).
</div>
UNREGISTERED
public static final EndTagType UNREGISTERED
The tag type given to an
unregistered end tag (
</ ... >
).
See the documentation of the
Tag.isUnregistered()
method for details.
</ "This is not recognised as any of the predefined end tag types in this library">
EndTagType
protected EndTagType(String description,
String startDelimiter,
String closingDelimiter,
boolean isServerTag)
Constructs a new
EndTagType
object with the specified properties.
(
implementation assistance method)
As
EndTagType
is an abstract class, this constructor is only called from sub-class constructors.
description
- a description of the new end tag type useful for debugging purposes.startDelimiter
- the start delimiter of the new end tag type.closingDelimiter
- the closing delimiter of the new end tag type.isServerTag
- indicates whether the new end tag type is a server tag.
constructEndTag
protected final EndTag constructEndTag(Source source,
int begin,
int end,
String name)
source
- the Source
document.begin
- the character position in the source document where this tag begins.end
- the character position in the source document where this tag ends.name
- the name of the tag.
generateHTML
public String generateHTML(String startTagName)
getCorrespondingStartTagType
public StartTagType getCorrespondingStartTagType()
getEndTagName
public String getEndTagName(String startTagName)
Returns the end tag
name that is required to match a
corresponding start tag with the specified
name.
(
property method)
This default implementation simply returns
startTagName
.
Note that the
startTagName
parameter should include the start tag's
name prefix if it has one.