java.lang.Object
io.sf.carte.doc.style.css.parser.ConditionVisitor
io.sf.carte.doc.style.css.parser.AttributeConditionVisitor
- All Implemented Interfaces:
Visitor<AttributeCondition>
public abstract class AttributeConditionVisitor
extends ConditionVisitor
implements Visitor<AttributeCondition>
Subclasses can be used to visit a selector (or a selector list) and replace
the namespaceURI, localName or value of the contained
AttributeCondition
s.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
setConditionLocalName
(AttributeCondition cond, String newLocalName) Sets the LocalName of the attribute condition.protected void
setConditionNamespaceURI
(AttributeCondition cond, String namespaceURI) Sets the namespaceURI of the attribute condition.protected void
setConditionValue
(AttributeCondition cond, String newValue) Sets the value of the attribute condition.abstract void
visit
(AttributeCondition condition) Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.protected void
Visit a condition.Methods inherited from class io.sf.carte.doc.style.css.parser.ConditionVisitor
visit, visit
-
Constructor Details
-
AttributeConditionVisitor
protected AttributeConditionVisitor()
-
-
Method Details
-
visit
Visit a condition.- Specified by:
visit
in classConditionVisitor
- Parameters:
condition
- the condition.
-
setConditionNamespaceURI
protected void setConditionNamespaceURI(AttributeCondition cond, String namespaceURI) throws DOMException Sets the namespaceURI of the attribute condition.- Parameters:
cond
- the attribute condition to be set.namespaceURI
- the new namespaceURI.- Throws:
DOMException
- INVALID_ACCESS_ERR if the namespaceURI isnull
or empty.
-
setConditionLocalName
protected void setConditionLocalName(AttributeCondition cond, String newLocalName) throws DOMException Sets the LocalName of the attribute condition.- Parameters:
cond
- the attribute condition to be set.newLocalName
- the new LocalName.- Throws:
DOMException
- INVALID_ACCESS_ERR if the newLocalName isnull
or empty.
-
setConditionValue
Sets the value of the attribute condition.- Parameters:
cond
- the attribute condition to be set.newValue
- the new value.- Throws:
DOMException
- INVALID_ACCESS_ERR if theConditionType
isCLASS
and the value isnull
or empty.
-
visit
Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.- Specified by:
visit
in interfaceVisitor<AttributeCondition>
- Parameters:
condition
- the attribute condition.
-