Class CssPropertyNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssValueNode
-
- com.google.common.css.compiler.ast.CssPropertyNode
-
- All Implemented Interfaces:
Locatable
public class CssPropertyNode extends CssValueNode
A node representing a CSS property, such as background or padding.
-
-
Constructor Summary
Constructors Constructor Description CssPropertyNode(CssPropertyNode node)Creates a property node by deep-copying the specified property node.CssPropertyNode(java.lang.String value)Creates a property node with the specified value.CssPropertyNode(java.lang.String value, SourceCodeLocation sourceCodeLocation)Creates a property node with the specified value and source code location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CssPropertyNodedeepCopy()java.lang.StringgetPartition()Gets the partition of this property.PropertygetProperty()java.lang.StringgetPropertyName()booleanisCustom()java.lang.StringtoString()Use for debugging only.-
Methods inherited from class com.google.common.css.compiler.ast.CssValueNode
getIsDefault, getValue, setIsDefault, setValue
-
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 Detail
-
CssPropertyNode
public CssPropertyNode(java.lang.String value)
Creates a property node with the specified value.
-
CssPropertyNode
public CssPropertyNode(java.lang.String value, @Nullable SourceCodeLocation sourceCodeLocation)Creates a property node with the specified value and source code location.
-
CssPropertyNode
public CssPropertyNode(CssPropertyNode node)
Creates a property node by deep-copying the specified property node.
-
-
Method Detail
-
deepCopy
public CssPropertyNode deepCopy()
- Specified by:
deepCopyin classCssValueNode
-
getProperty
public Property getProperty()
-
getPropertyName
public java.lang.String getPropertyName()
-
isCustom
public boolean isCustom()
- Returns:
- whether this is a CSS custom property.
-
getPartition
public java.lang.String getPartition()
Gets the partition of this property. All properties with the same partition share a common shorthand. A non-standard property is its own single partition.For example,
padding,padding-bottom,padding-left,padding-right,padding-topare all in thepaddingpartition. As another example,z-indexis its own single partition.- Returns:
- a string representing the partition
-
toString
public java.lang.String toString()
Description copied from class:CssValueNodeUse for debugging only.- Overrides:
toStringin classCssValueNode- See Also:
Object.toString()
-
-