Class CssSelectorNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssSelectorNode
-
- All Implemented Interfaces:
ChunkAware,Locatable
public class CssSelectorNode extends CssNode implements ChunkAware
A node representing a selector in the AST.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCssSelectorNode.SpecificityThe specifity of a selector is used to select among rules with the same importance and origin.
-
Constructor Summary
Constructors Constructor Description CssSelectorNode(CssSelectorNode node)Copy-constructor of a selector node.CssSelectorNode(java.lang.String selectorName)Constructor of a selector node.CssSelectorNode(java.lang.String selectorName, SourceCodeLocation sourceCodeLocation)Constructor of a selector node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CssSelectorNodedeepCopy()java.lang.ObjectgetChunk()Gets the chunk id of the node.CssCombinatorNodegetCombinator()CssRefinerListNodegetRefiners()java.lang.StringgetSelectorName()CssSelectorNode.SpecificitygetSpecificity()voidsetChunk(java.lang.Object chunk)Sets the chunk id on the node.voidsetCombinator(CssCombinatorNode combinator)voidsetRefiners(CssRefinerListNode refiners)voidsetSelectorName(java.lang.String selectorName)java.lang.StringtoString()For debugging only.-
Methods inherited from class com.google.common.css.compiler.ast.CssNode
ancestors, appendComment, deepCopyNodes, equals, getComments, getParent, getShouldBeFlipped, getSourceCodeLocation, getVisitController, hasComment, hashCode, inFunArgs, setComments, setShouldBeFlipped, setSourceCodeLocation
-
-
-
-
Constructor Detail
-
CssSelectorNode
public CssSelectorNode(@Nullable java.lang.String selectorName, @Nullable SourceCodeLocation sourceCodeLocation)Constructor of a selector node.- Parameters:
selectorName-sourceCodeLocation-
-
CssSelectorNode
public CssSelectorNode(java.lang.String selectorName)
Constructor of a selector node.- Parameters:
selectorName-
-
CssSelectorNode
public CssSelectorNode(CssSelectorNode node)
Copy-constructor of a selector node.- Parameters:
node-
-
-
Method Detail
-
deepCopy
public CssSelectorNode deepCopy()
-
getRefiners
public CssRefinerListNode getRefiners()
-
setRefiners
public void setRefiners(CssRefinerListNode refiners)
-
getCombinator
public CssCombinatorNode getCombinator()
-
setCombinator
public void setCombinator(CssCombinatorNode combinator)
-
setSelectorName
public void setSelectorName(java.lang.String selectorName)
-
getSelectorName
public java.lang.String getSelectorName()
-
getSpecificity
public CssSelectorNode.Specificity getSpecificity()
-
setChunk
public void setChunk(java.lang.Object chunk)
Description copied from interface:ChunkAwareSets the chunk id on the node.- Specified by:
setChunkin interfaceChunkAware- Parameters:
chunk- an object identifying a chunk
-
getChunk
public java.lang.Object getChunk()
Description copied from interface:ChunkAwareGets the chunk id of the node.- Specified by:
getChunkin interfaceChunkAware- Returns:
- the chunk id or
nullif no chunk id was previously set
-
-