Package dev.amp.validator.selector
Class TypeSelector
- java.lang.Object
-
- com.steadystate.css.parser.Token
-
- dev.amp.validator.css.Token
-
- dev.amp.validator.selector.Selector
-
- dev.amp.validator.selector.TypeSelector
-
- All Implemented Interfaces:
Serializable
public class TypeSelector extends Selector
This node models type selectors and universal selectors. http://www.w3.org/TR/css3-selectors/#type-selectors http://www.w3.org/TR/css3-selectors/#universal-selector- Author:
- nhant01, GeorgeLuo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypeSelector(String namespacePrefix, String elementName)Choices for namespacePrefix: - 'a specific namespace prefix' means 'just that specific namespace'.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SelectorVisitor visitor)voidforEachChild(Consumer<Selector> selector)TokenTypegetTokenType()Getter for token type returns stylesheet.StringtoString()Serializes the selector to a string (in this case CSS syntax that could be used to recreate it).
-
-
-
Constructor Detail
-
TypeSelector
public TypeSelector(String namespacePrefix, String elementName)
Choices for namespacePrefix: - 'a specific namespace prefix' means 'just that specific namespace'. - '' means 'without a namespace' - '*' means 'any namespace including without a namespace' - null means the default namespace if one is declared, and '*' otherwise. The universal selector is covered by setting the elementName to '*'.- Parameters:
namespacePrefix- a namespace prefixelementName- element name
-
-
Method Detail
-
forEachChild
public void forEachChild(Consumer<Selector> selector)
- Specified by:
forEachChildin classSelector- Parameters:
selector- selector function
-
accept
public void accept(SelectorVisitor visitor)
-
getTokenType
public TokenType getTokenType()
Getter for token type returns stylesheet.- Specified by:
getTokenTypein classToken- Returns:
- TokenType.STYLESHEET
-
-