| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectau.id.jericho.lib.html.TagTypeau.id.jericho.lib.html.EndTagTypepublic abstract class EndTagTypeextends TagTypeTagType that starts with the characters '</'.
Instances of all the standard end tag types are available in this class as static
fields.
StartTagTypeField Summary | |
static EndTagType | |
static EndTagType |
|
Constructor Summary | |
| |
Method Summary | |
protected EndTag |
|
String |
|
StartTagType |
|
Methods inherited from class au.id.jericho.lib.html.TagType | |
constructTagAt, deregister, getClosingDelimiter, getDescription, getNamePrefix, getRegisteredTagTypes, getStartDelimiter, getTagTypesIgnoringEnclosedMarkup, isServerTag, isValidPosition, register, setTagTypesIgnoringEnclosedMarkup, tagEncloses, toString | |
public static final EndTagType NORMAL
The tag type given to a normal HTML or XML end tag (</name>).
Property/Method Value Description/normal StartDelimiter</ClosingDelimiter>IsServerTagfalseNamePrefix(empty string) CorrespondingStartTagTypeStartTagType.NORMALgenerateHTML("StartTagName")</StartTagName></div>
public static final EndTagType UNREGISTERED
The tag type given to an unregistered end tag (</...>). See the documentation of theTag.isUnregistered()method for details.
Property/Method Value Description/unregistered StartDelimiter</ClosingDelimiter>IsServerTagfalseNamePrefix(empty string) CorrespondingStartTagTypenullgenerateHTML("StartTagName")</StartTagName></ "This is not recognised as any of the predefined end tag types in this library">
- See Also:
StartTagType.UNREGISTERED
protected EndTagType(String description,
String startDelimiter,
String closingDelimiter,
boolean isServerTag)Constructs a newEndTagTypeobject with the specified properties.
(implementation assistance method) AsEndTagTypeis an abstract class, this constructor is only called from sub-class constructors.
- Parameters:
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.
protected final EndTag constructEndTag(Source source, int begin, int end, String name)
Internal method for the construction of anEndTagobject of this type.
(implementation assistance method) Intended for use from within theconstructTagAt(Source, int pos)method.
- Returns:
- the new
EndTagobject.
public String generateHTML(String startTagName)
Generates the HTML text of an end tag of this type given the name of a corresponding start tag.
(property method) This default implementation returnsgetStartDelimiter()+startTagName+getClosingDelimiter().
End Tag Type HTML Generated for specified StartTagName UNREGISTERED</StartTagName>NORMAL</StartTagName>
End Tag Type HTML Generated for specified StartTagName MasonTagTypes.MASON_COMPONENT_CALLED_WITH_CONTENT_END</&>MasonTagTypes.MASON_NAMED_BLOCK_END</%StartTagName>
- Parameters:
startTagName- the name of a corresponding start tag.
- Returns:
- the HTML text of an end tag of this type given the name of a corresponding start tag.
public StartTagType getCorrespondingStartTagType()
Returns the type of start tag that is usually paired with an end tag of this type to form anElement.
(default implementation method) The default implementation returnsnull. This property is informational only and is not used by the parser in any way. The mapping of end tag type to the corresponding start tag type is in any case one-to-many, which is why the definition emphasises the word "usually". An example of this is thePHPTagTypes.PHP_SCRIPTstart tag type, whose corresponding end tag type isEndTagType.NORMAL, while the converse is not true. The only predefined end tag type that returnsnullfor this property is the specialUNREGISTEREDend tag type. Although this method is used like a property method, it is implemented as a default implementation method to avoid cyclic references between statically instantiatedStartTagTypeandEndTagTypeobjects.
End Tag Type Corresponding Start Tag Type UNREGISTEREDnullNORMALStartTagType.NORMAL
End Tag Type Corresponding Start Tag Type MasonTagTypes.MASON_COMPONENT_CALLED_WITH_CONTENT_ENDMasonTagTypes.MASON_COMPONENT_CALLED_WITH_CONTENTMasonTagTypes.MASON_NAMED_BLOCK_ENDMasonTagTypes.MASON_NAMED_BLOCK