Class CssDefinitionNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssNodesListNode<CssValueNode>
-
- com.google.common.css.compiler.ast.CssAtRuleNode
-
- com.google.common.css.compiler.ast.CssDefinitionNode
-
- All Implemented Interfaces:
ChunkAware,Locatable
public class CssDefinitionNode extends CssAtRuleNode implements ChunkAware
A node representing a GSS definition. For example:@def BASE_BG_COLOR white;
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.css.compiler.ast.CssAtRuleNode
CssAtRuleNode.Type
-
-
Field Summary
-
Fields inherited from class com.google.common.css.compiler.ast.CssNodesListNode
children
-
-
Constructor Summary
Constructors Constructor Description CssDefinitionNode(CssDefinitionNode node)Copy constructor.CssDefinitionNode(CssLiteralNode name)Constructor of a definition.CssDefinitionNode(CssLiteralNode name, java.util.List<CssCommentNode> comments)Constructor of a definition.CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name)Constructor of a definition.CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, SourceCodeLocation sourceCodeLocation)Constructor of a definition.CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, java.util.List<CssCommentNode> comments)Constructor of a definition.CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, java.util.List<CssCommentNode> comments, SourceCodeLocation sourceCodeLocation)Constructor of a definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CssDefinitionNodedeepCopy()java.lang.ObjectgetChunk()Gets the chunk id of the node.voidsetChunk(java.lang.Object chunk)Sets the chunk id on the node.java.lang.StringtoString()For debugging only.-
Methods inherited from class com.google.common.css.compiler.ast.CssAtRuleNode
getBlock, getName, getParameters, getParametersCount, getType, setParameters
-
Methods inherited from class com.google.common.css.compiler.ast.CssNodesListNode
addChildToBack, childIterable, getChildAt, getChildIterator, getChildren, getLastChild, getSourceCodeLocation, isEmpty, isEnclosedWithBraces, numChildren, replaceChildAt
-
Methods inherited from class com.google.common.css.compiler.ast.CssNode
ancestors, appendComment, deepCopyNodes, equals, getComments, getParent, getShouldBeFlipped, getVisitController, hasComment, hashCode, inFunArgs, setComments, setShouldBeFlipped, setSourceCodeLocation
-
-
-
-
Constructor Detail
-
CssDefinitionNode
public CssDefinitionNode(CssLiteralNode name, java.util.List<CssCommentNode> comments)
Constructor of a definition.- Parameters:
name- namecomments- comments
-
CssDefinitionNode
public CssDefinitionNode(CssLiteralNode name)
Constructor of a definition.- Parameters:
name- name
-
CssDefinitionNode
public CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name)
Constructor of a definition.- Parameters:
parameters- parametersname- name
-
CssDefinitionNode
public CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, SourceCodeLocation sourceCodeLocation)
Constructor of a definition.- Parameters:
parameters-name-sourceCodeLocation-
-
CssDefinitionNode
public CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, java.util.List<CssCommentNode> comments)
Constructor of a definition.- Parameters:
parameters- parametersname- namecomments- comments
-
CssDefinitionNode
public CssDefinitionNode(java.util.List<CssValueNode> parameters, CssLiteralNode name, java.util.List<CssCommentNode> comments, SourceCodeLocation sourceCodeLocation)
Constructor of a definition.- Parameters:
parameters- parametersname- namecomments- commentssourceCodeLocation- sourceCodeLocation
-
CssDefinitionNode
public CssDefinitionNode(CssDefinitionNode node)
Copy constructor.- Parameters:
node- node
-
-
Method Detail
-
deepCopy
public CssDefinitionNode deepCopy()
-
toString
public java.lang.String toString()
For debugging only.- Overrides:
toStringin classCssAtRuleNode- See Also:
Object.toString()
-
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
-
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
-
-