Class CssDeclarationNode

  • All Implemented Interfaces:
    Locatable

    public class CssDeclarationNode
    extends CssNode
    A node representing a CSS declaration in the abstract syntax tree. For example: background: red or --card-padding: 24px.
    • Constructor Detail

      • CssDeclarationNode

        public CssDeclarationNode​(CssPropertyNode propertyName)
        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 - propertyName
        sourceCodeLocation - sourceCodeLocation
      • CssDeclarationNode

        public CssDeclarationNode​(CssPropertyNode propertyName,
                                  java.util.List<CssCommentNode> comments)
        Constructor of a node representing a CSS declaration.
        Parameters:
        propertyName - propertyName
        comments - comments
      • CssDeclarationNode

        public CssDeclarationNode​(CssPropertyNode propertyName,
                                  java.util.List<CssCommentNode> comments,
                                  @Nullable
                                  SourceCodeLocation sourceCodeLocation)
        Constructor of a node representing a CSS declaration.
        Parameters:
        propertyName - propertyName
        comments - comments
        sourceCodeLocation - 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
                                  java.util.List<CssCommentNode> comments,
                                  @Nullable
                                  SourceCodeLocation sourceCodeLocation)
        Constructor of a node representing a CSS declaration.
        Parameters:
        propertyName - propertyName
        propertyValue - propertyValue
        comments - comments
        sourceCodeLocation - sourceCodeLocation
      • CssDeclarationNode

        public CssDeclarationNode​(CssDeclarationNode node)
        Copy constructor.
    • Method Detail

      • setPropertyName

        public void setPropertyName​(CssPropertyNode propertyName)
      • 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's hasStarHack attribute.
        Returns:
        true if this node's hasStarHack is set to true.
      • isCustomDeclaration

        public boolean isCustomDeclaration()
        Returns:
        whether this node represents the declaration of a CSS custom property.
      • toString

        public java.lang.String toString()
        For debugging only.
        Overrides:
        toString in class CssNode
        See Also:
        Object.toString()