public final class MasonTagTypes
extends java.lang.Object
There is no specific tag type defined for the Mason substitution tag as it is recognised using the common server tag type.
The tag types defined in this class are not registered by default.
The register()
method is provided as a convenient way to register them all at once.
Modifier and Type | Field and Description |
---|---|
static StartTagType |
MASON_COMPONENT_CALL
The tag type given to a
Mason component call
(
<& ... &> ). |
static StartTagType |
MASON_COMPONENT_CALLED_WITH_CONTENT
The tag type given to the start tag of a
Mason component called with content
(
<&| ... &> ... </&> ). |
static EndTagType |
MASON_COMPONENT_CALLED_WITH_CONTENT_END
The tag type given to the end tag of a
Mason component called with content.
|
static StartTagType |
MASON_NAMED_BLOCK
The tag type given to the start tag of a
Mason named block
(
<%name ... > ... </%name> ). |
static EndTagType |
MASON_NAMED_BLOCK_END
The tag type given to the end tag of a
Mason named block.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
defines(TagType tagType)
Indicates whether the specified tag type is defined in this class.
|
static void |
deregister()
Deregisters all of the tag types defined in this class at once.
|
static boolean |
isParsedByMason(TagType tagType)
Indicates whether the specified tag type is recognised by a Mason parser.
|
static void |
register()
Registers all of the tag types defined in this class at once.
|
public static final StartTagType MASON_COMPONENT_CALL
<& ... &>
).
Property | Value |
---|---|
Description | mason component call |
StartDelimiter | <&
|
ClosingDelimiter | &>
|
IsServerTag | true
|
NamePrefix | &
|
CorrespondingEndTagType | null
|
HasAttributes | false
|
IsNameAfterPrefixRequired | false
|
<& menu &>
public static final StartTagType MASON_COMPONENT_CALLED_WITH_CONTENT
<&| ... &> ... </&>
).
Property | Value |
---|---|
Description | mason component called with content |
StartDelimiter | <&|
|
ClosingDelimiter | &>
|
IsServerTag | true
|
NamePrefix | &|
|
CorrespondingEndTagType | MASON_COMPONENT_CALLED_WITH_CONTENT_END
|
HasAttributes | false
|
IsNameAfterPrefixRequired | false
|
<&| /sql/select, query => 'SELECT name, age FROM User' &> <tr><td>%name</td><td>%age</td></tr> </&>
public static final EndTagType MASON_COMPONENT_CALLED_WITH_CONTENT_END
See the corresponding start tag type
MASON_COMPONENT_CALLED_WITH_CONTENT
for more details.
Property/Method | Value |
---|---|
Description | /mason component called with content |
StartDelimiter | </&
|
ClosingDelimiter | >
|
IsServerTag | true
|
NamePrefix | /&
|
CorrespondingStartTagType | MASON_COMPONENT_CALLED_WITH_CONTENT
|
generateHTML ("StartTagName") | </&>
|
</&>
MASON_COMPONENT_CALLED_WITH_CONTENT
public static final StartTagType MASON_NAMED_BLOCK
<%name ... > ... </%name>
).
A tag of this type must not have a '%
' character before its
closing delimiter, otherwise it is most likely a
common server tag.
For the start tag to be recognised, a corresponding end tag of the correct type must exist somewhere in the source document following the start tag.
Property | Value |
---|---|
Description | mason named block |
StartDelimiter | <%
|
ClosingDelimiter | >
|
IsServerTag | true
|
NamePrefix | %
|
CorrespondingEndTagType | MASON_NAMED_BLOCK_END
|
HasAttributes | false
|
IsNameAfterPrefixRequired | true
|
<%perl> print "hello world"; </%perl>
public static final EndTagType MASON_NAMED_BLOCK_END
See the corresponding start tag type
MASON_NAMED_BLOCK
for more details.
Property/Method | Value |
---|---|
Description | /mason named block |
StartDelimiter | </%
|
ClosingDelimiter | >
|
IsServerTag | true
|
NamePrefix | /%
|
CorrespondingStartTagType | MASON_NAMED_BLOCK
|
generateHTML ("%StartTagName") | </%StartTagName>
|
</%perl>
MASON_NAMED_BLOCK
public static void register()
The tag types must be registered before the parser will recognise them.
public static void deregister()
public static boolean defines(TagType tagType)
tagType
- the TagType
to test.true
if the specified tag type is defined in this class, otherwise false
.public static boolean isParsedByMason(TagType tagType)
This is true if the specified tag type is defined in this class or if it is the common server tag type.