public class CSSSelector extends SourceLocation implements ICSSSelector
| Modifier and Type | Field and Description |
|---|---|
protected List<ICSSNode> |
children
A list of children nodes.
|
UNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
CSSSelector(CSSCombinator combinator,
String elementName,
String namespacePrefix,
List<CSSSelectorCondition> conditions,
org.antlr.runtime.tree.CommonTree tree,
org.antlr.runtime.TokenStream tokenStream) |
| Modifier and Type | Method and Description |
|---|---|
int |
getArity()
Get the node's child count.
|
ICSSCombinator |
getCombinator()
Get the combinator of this selector if it exists.
|
static com.google.common.collect.ImmutableList<ICSSSelector> |
getCombinedSelectorList(ICSSSelector selector)
Convert the selectors chained by combinators into a list of simple
selectors ordering from ancestors to descendants.
|
com.google.common.collect.ImmutableList<ICSSSelectorCondition> |
getConditions()
Get selector conditions.
|
String |
getCSSSyntax()
This API is explicitly added so that no CSS compilation logic will depend
on
toString() value of an ICSSNode. |
String |
getElementName()
Get the element name.
|
String |
getNamespacePrefix()
Get the namespace prefix.
|
ICSSNode |
getNthChild(int index)
Get the node's nth child.
|
CSSModelTreeType |
getOperator()
Get the node's type.
|
boolean |
isAdvanced()
This implementation is based on
mx.styles::CSSStyleDeclaration.isAdvanced() in Flex SDK 4.5.2. |
String |
toString()
Displays line, column, start, end, and sourcepath in a format such as
"17:5 160-188 C:\test.as"
|
String |
toStringTree()
Recursively print out the text representation of the tree.
|
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, getStart, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArity, getNthChild, getOperator, toStringTreegetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartprotected CSSSelector(CSSCombinator combinator, String elementName, String namespacePrefix, List<CSSSelectorCondition> conditions, org.antlr.runtime.tree.CommonTree tree, org.antlr.runtime.TokenStream tokenStream)
public String getElementName()
ICSSSelectorLabel is the element name
for "s|Label.noBorder".getElementName in interface ICSSSelectorpublic String getNamespacePrefix()
ICSSSelectormx is the namespace
prefix for "mx|Button".getNamespacePrefix in interface ICSSSelectorpublic com.google.common.collect.ImmutableList<ICSSSelectorCondition> getConditions()
ICSSSelectorExample: selector conditions.
s|Button.rounded#main:upIn this selector, the conditions are "
.rounded", "#main"
and ":up".getConditions in interface ICSSSelectorpublic String toString()
SourceLocation"17:5 160-188 C:\test.as"
toString in class SourceLocationpublic String getCSSSyntax()
ICSSSelectortoString() value of an ICSSNode.getCSSSyntax in interface ICSSSelectorpublic ICSSCombinator getCombinator()
ICSSSelectorgetCombinator in interface ICSSSelectorpublic static com.google.common.collect.ImmutableList<ICSSSelector> getCombinedSelectorList(ICSSSelector selector)
For example: s|HBox s|VBox s|Label
will be converted to:
List { HBox, VBox, Label }
selector - The subject selector in a descendant selector chain.public boolean isAdvanced()
mx.styles::CSSStyleDeclaration.isAdvanced() in Flex SDK 4.5.2.isAdvanced in interface ICSSSelectorpublic String toStringTree()
toStringTree in interface ICSSNodepublic int getArity()
ICSSNodeDefaultAdapter.public ICSSNode getNthChild(int index)
ICSSNodeDefaultAdapter.getNthChild in interface ICSSNodeindex - Child index.public CSSModelTreeType getOperator()
ICSSNodeDefaultAdapter.getOperator in interface ICSSNodeCopyright © 2016 The Apache Software Foundation. All rights reserved.