Package io.sf.carte.doc.style.css.parser
Class AttributeConditionVisitor
java.lang.Object
io.sf.carte.doc.style.css.parser.AttributeConditionVisitor
- All Implemented Interfaces:
io.sf.carte.util.Visitor<AttributeCondition>
public abstract class AttributeConditionVisitor
extends Object
implements io.sf.carte.util.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.voidVisit a selector.voidvisit(SelectorList list) Visit a list of selectors.
-
Constructor Details
-
AttributeConditionVisitor
protected AttributeConditionVisitor()
-
-
Method Details
-
visit
Visit a list of selectors.- Parameters:
list- the list of selectors.
-
visit
Visit a selector.- Parameters:
selector- the selector.
-
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 interfaceio.sf.carte.util.Visitor<AttributeCondition>- Parameters:
condition- the attribute condition.
-