public class ClassAttributeHandler extends CustomAttribute
class
attribute by delegating to
Element.getClassList()
.
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
ClassAttributeHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(Element element)
Gets the value that should be returned by
Element.getAttribute(String) for this attribute. |
boolean |
hasAttribute(Element element)
Checks what
Element.hasAttribute(String) should return for this
attribute. |
void |
removeAttribute(Element element)
Removes the attribute when
Element.removeAttribute(String) is
called for this attribute. |
void |
setAttribute(Element element,
String value)
Sets the value when
Element.setAttribute(String, String) is
called for this attribute. |
get, getNames
public boolean hasAttribute(Element element)
CustomAttribute
Element.hasAttribute(String)
should return for this
attribute.hasAttribute
in class CustomAttribute
element
- the element to check, not null
true
if the element has a value for this attribute,
otherwise false
public String getAttribute(Element element)
CustomAttribute
Element.getAttribute(String)
for this attribute.getAttribute
in class CustomAttribute
element
- the element to check, not null
public void setAttribute(Element element, String value)
CustomAttribute
Element.setAttribute(String, String)
is
called for this attribute.setAttribute
in class CustomAttribute
element
- the element for which to set the value, not null
value
- the new attribute value, not null
public void removeAttribute(Element element)
CustomAttribute
Element.removeAttribute(String)
is
called for this attribute.removeAttribute
in class CustomAttribute
element
- the element for which to remove the attribute, not
null
Copyright © 2021. All rights reserved.