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
AttributeConditions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetConditionLocalName(AttributeCondition cond, String newLocalName) Sets the LocalName of the attribute condition.protected voidsetConditionNamespaceURI(AttributeCondition cond, String namespaceURI) Sets the namespaceURI of the attribute condition.protected voidsetConditionValue(AttributeCondition cond, String newValue) Sets the value of the attribute condition.abstract voidvisit(AttributeCondition condition) Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.protected voidVisit 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:
visitin 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 isnullor 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 isnullor 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 theConditionTypeisCLASSand the value isnullor empty.
-
visit
Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.- Specified by:
visitin interfaceVisitor<AttributeCondition>- Parameters:
condition- the attribute condition.
-