Package org.apache.sling.commons.html
Interface HtmlElement
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Taccept(org.apache.sling.commons.html.util.Visitor<T> visitor) Accepts a Visitor to visitdefault booleancontainsAttribute(String attrName) default StringgetAttributeValue(String name) getType()Retrieve the associated ElementTypegetValue()The String value that best represents what this element is.default booleanWhether this element contains Attributesdefault booleandefault voidsetAttribute(String name, String value) booleanMust be defined as true to allow default methods to work correctly, this method and the getAttributes method are used together to implement attribute support in an element.
-
Method Details
-
getType
HtmlElementType getType()Retrieve the associated ElementType- Returns:
- element type
-
supportsAttributes
boolean supportsAttributes()Must be defined as true to allow default methods to work correctly, this method and the getAttributes method are used together to implement attribute support in an element.- Returns:
- true if Element supports attributes
-
getAttributes
-
getValue
String getValue()The String value that best represents what this element is.- Returns:
-
accept
default <T> T accept(org.apache.sling.commons.html.util.Visitor<T> visitor) Accepts a Visitor to visit- Parameters:
visitor-- Returns:
-
getVoidTag
default boolean getVoidTag()Whether this element contains Attributes- Returns:
-
hasAttributes
default boolean hasAttributes() -
containsAttribute
-
getAttributeValue
-
setAttribute
-