org.eclipse.jet.taglib
Interface TagDefinition
-
public interface TagDefinition
Expose the definition of a tag, as declared in a 'org.eclipse.jet.tagLibraries' extension.
This interface is not intended to be implemented by clients.
getName
java.lang.String getName()
- Return the name of the tag as it is registered in the tag library
-
-
Returns:
- the tag's name
getDescription
java.lang.String getDescription()
-
getKind
CustomTagKind getKind()
- Return the tag kind (
CustomTagKind
).
-
-
Returns:
- the tag kind.
getAttributeDefinition
TagAttributeDefinition getAttributeDefinition(java.lang.String name)
- Return the definition of the named attribute
-
-
Parameters:
-
name
- the attribute name
-
Returns:
- the attribute definition, or
null
if the name
is not
an attribute of the named tag.
getAttributeDefinitions
java.util.List getAttributeDefinitions()
- Return a list of attribute definitions for this tag
-
-
Returns:
- a List of
TagAttributeDefinition
objects. The empty list is returned if there
are no attribute definitions for this tag definition.
isDeprecated
boolean isDeprecated()
- Test if the tag is declared to be deprecated.
-
-
Returns:
-
true
if the tag is deprecated.
requiresNewWriter
boolean requiresNewWriter()
- Test whether the tag requires a new writer for its contents.
The following tag declaration will have the value set to
true
:
-
functionTag
-
containerTag
with processContents
set to custom
.
-
conditionalTag
with processContents
set to custom
.
-
iteratingTag
with processContents
set to custom
.
-
-
Returns:
-
true
if a new writer is required, false
otherwise.
isEmptyTagAllowed
boolean isEmptyTagAllowed()
- Test whether the tag is allowed to be specified in the empty tag form: <tagName/>.
The following tag declarations will have the value set to
true
.
-
emptyTag
-
containerTag
with allowAsEmpty
set to true
.
-
-
Returns:
-
true
if the tag may be expressed as a empty tag.
isContentAllowed
boolean isContentAllowed()
- Test whether the tag is allowed to have content (even empty content). That is, this
method tests whether a tag of the form:
<tagName> ... </tagName>
The following tag declarations will have the value set to true
:
-
functionTag
-
containerTag
-
conditionalTag
-
iteratingTag
-
-
Returns:
-
true
if the tag may be expressed as a content tag.
getTagLibrary
TagLibrary getTagLibrary()
- Return the
TagLibrary
that contains this tag definition.
-
-
Returns:
- a TagLibrary instance.
removeWhenContainingLineIsEmpty
boolean removeWhenContainingLineIsEmpty()
- Indicate whether the compiler should remove whitespace including the trailing
new line from tags that occur on an otherwise empty line.
-
-
Returns:
-
true
if such whitespace should be removed.