public abstract class Tag
extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Tag.VisitCallback
Interface for a callback method of the visit
|
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
abstract Tag |
findAncestor(String namespace,
String tagName)
Find an ancestor tag by its namespace and tag name
|
abstract java.util.stream.Stream<Tag> |
findChildren(String namespace,
String tagName)
Find children by the given namespace and tag name
|
abstract String |
getAttribute(String name)
Get the value for an attribute
|
abstract java.util.Set<String> |
getAttributeNames()
Get the names of the declared attributes on the tag
|
abstract java.util.stream.Stream<Tag> |
getChildren()
Get all the children tags
|
abstract String |
getName()
Get the tag name
|
abstract String |
getNamespace()
Gets the namespace of the tag
|
abstract Tag |
getParent()
Get the parent tag
|
TagDefinition |
getTagDefinition()
Get the tag definition for this tag.
|
static TagDefinition |
getTagDefinition(Tag tag)
Look up the tag definition for a tag.
|
TagHandler |
getTagHandler()
Get the tag handler for this tag
|
abstract String |
getTextContent()
Get the text content of the tag
|
abstract boolean |
isFacet()
Convenience function to check if this tag is an amx:facet tag
|
abstract boolean |
visit(Tag.VisitCallback callback)
Visit the tag and its children
|
public abstract java.util.Set<String> getAttributeNames()
public abstract String getAttribute(String name)
name
- the name of the attributepublic abstract Tag getParent()
public abstract java.util.stream.Stream<Tag> getChildren()
public abstract Tag findAncestor(String namespace, String tagName)
namespace
- the namespace of the tag to findtagName
- the name of the tag to findpublic abstract java.util.stream.Stream<Tag> findChildren(String namespace, String tagName)
namespace
- the namespace or null to not filter on namespacetagName
- the tag name or null to not filter on the tag namepublic abstract boolean isFacet()
public abstract String getNamespace()
public abstract String getName()
public abstract String getTextContent()
public TagDefinition getTagDefinition()
getTagDefinition(Tag)
.public abstract boolean visit(Tag.VisitCallback callback)
callback
- the function to invorkepublic static TagDefinition getTagDefinition(Tag tag)
tag
- the tag for which to get the definitionpublic TagHandler getTagHandler()