public class CSSProperty extends SourceLocation implements ICSSProperty
Modifier and Type | Field and Description |
---|---|
protected List<ICSSNode> |
children
A list of children nodes.
|
UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
CSSProperty(String name,
CSSPropertyValue value,
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.
|
String |
getName() |
ICSSNode |
getNthChild(int index)
Get the node's nth child.
|
CSSModelTreeType |
getOperator()
Get the node's type.
|
ICSSPropertyValue |
getValue() |
protected static String |
normalize(String name)
Normalize CSS property names to camel-case style names.
|
String |
toCSSString() |
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, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getArity, getNthChild, getOperator, toStringTree
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
protected CSSProperty(String name, CSSPropertyValue value, org.antlr.runtime.tree.CommonTree tree, org.antlr.runtime.TokenStream tokenStream)
public String getName()
getName
in interface ICSSProperty
public ICSSPropertyValue getValue()
getValue
in interface ICSSProperty
public String toString()
SourceLocation
"17:5 160-188 C:\test.as"
toString
in class SourceLocation
public String toCSSString()
protected static String normalize(String name)
For example:
normalize("font-family")
returns "fontFamily"
.
normalize("fontFamily")
returns "fontFamily"
.
name
- CSS property namepublic String toStringTree()
toStringTree
in interface ICSSNode
public int getArity()
ICSSNode
DefaultAdapter
.public ICSSNode getNthChild(int index)
ICSSNode
DefaultAdapter
.getNthChild
in interface ICSSNode
index
- Child index.public CSSModelTreeType getOperator()
ICSSNode
DefaultAdapter
.getOperator
in interface ICSSNode
Copyright © 2016 The Apache Software Foundation. All rights reserved.