Class CssDeclarationNode
java.lang.Object
com.google.common.css.compiler.ast.CssNode
com.google.common.css.compiler.ast.CssDeclarationNode
- All Implemented Interfaces:
Locatable
A node representing a CSS declaration in the abstract syntax tree.
For example:
background: red or --card-padding: 24px.-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.CssDeclarationNode(CssPropertyNode propertyName) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyNode, CssPropertyValueNode cssPropertyValueNode) CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, List<CssCommentNode> comments, SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, List<CssCommentNode> comments, SourceCodeLocation sourceCodeLocation, boolean hasStarHack) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyName, SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyName, List<CssCommentNode> comments) Constructor of a node representing a CSS declaration.CssDeclarationNode(CssPropertyNode propertyName, List<CssCommentNode> comments, SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration. -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()booleanReturns the value of this node'shasStarHackattribute.booleanvoidsetPropertyName(CssPropertyNode propertyName) voidsetPropertyValue(CssPropertyValueNode propertyValue) voidsetStarHack(boolean hasStarHack) Sets the hasStarHack attribute to the given value.toString()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 Details
-
CssDeclarationNode
Constructor of a node representing a CSS declaration. -
CssDeclarationNode
public CssDeclarationNode(CssPropertyNode propertyName, @Nullable SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.- Parameters:
propertyName- propertyNamesourceCodeLocation- sourceCodeLocation
-
CssDeclarationNode
Constructor of a node representing a CSS declaration.- Parameters:
propertyName- propertyNamecomments- comments
-
CssDeclarationNode
public CssDeclarationNode(CssPropertyNode propertyName, List<CssCommentNode> comments, @Nullable SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.- Parameters:
propertyName- propertyNamecomments- commentssourceCodeLocation- sourceCodeLocation
-
CssDeclarationNode
public CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, @Nullable SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.- Parameters:
propertyName-propertyValue-sourceCodeLocation-
-
CssDeclarationNode
public CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, @Nullable List<CssCommentNode> comments, @Nullable SourceCodeLocation sourceCodeLocation) Constructor of a node representing a CSS declaration.- Parameters:
propertyName- propertyNamepropertyValue- propertyValuecomments- commentssourceCodeLocation- sourceCodeLocation
-
CssDeclarationNode
public CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue, @Nullable List<CssCommentNode> comments, @Nullable SourceCodeLocation sourceCodeLocation, boolean hasStarHack) Constructor of a node representing a CSS declaration. -
CssDeclarationNode
Copy constructor. -
CssDeclarationNode
-
-
Method Details
-
deepCopy
-
getPropertyName
-
setPropertyName
-
getPropertyValue
-
setPropertyValue
-
setStarHack
public void setStarHack(boolean hasStarHack) Sets the hasStarHack attribute to the given value.- Parameters:
hasStarHack-
-
hasStarHack
public boolean hasStarHack()Returns the value of this node'shasStarHackattribute.- Returns:
trueif this node'shasStarHackis set to true.
-
isCustomDeclaration
public boolean isCustomDeclaration()- Returns:
- whether this node represents the declaration of a CSS custom property.
-
toString
For debugging only.
-