Class CssValueNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssValueNode
-
- All Implemented Interfaces:
Locatable
- Direct Known Subclasses:
CssBooleanExpressionNode,CssCommentNode,CssCompositeValueNode,CssConstantReferenceNode,CssFunctionNode,CssHexColorNode,CssLiteralNode,CssNumericNode,CssPriorityNode,CssPropertyNode,CssStringNode,CssUnicodeRangeNode
public abstract class CssValueNode extends CssNode
A CSS node that holds a value of some sort. This is the base class for all the nodes in the abstract syntax tree that have a value.TODO(oana): Maybe de-emphasize the value aspect, allow value to be null, and rename this as CssTermNode.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCssValueNode(CssValueNode node)Copy constructor.protectedCssValueNode(java.lang.String value)Constructor of a node that contains a value.protectedCssValueNode(java.lang.String value, SourceCodeLocation sourceCodeLocation)Constructor of a node that contains a value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CssValueNodedeepCopy()booleangetIsDefault()java.lang.StringgetValue()voidsetIsDefault(boolean isDefault)voidsetValue(java.lang.String value)Subclasses should perform additional consistency checks.java.lang.StringtoString()Use 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 Detail
-
CssValueNode
protected CssValueNode(@Nullable java.lang.String value, @Nullable SourceCodeLocation sourceCodeLocation)Constructor of a node that contains a value.- Parameters:
value- valuesourceCodeLocation- sourceCodeLocation
-
CssValueNode
protected CssValueNode(java.lang.String value)
Constructor of a node that contains a value.- Parameters:
value- value
-
CssValueNode
protected CssValueNode(CssValueNode node)
Copy constructor.- Parameters:
node- node
-
-
Method Detail
-
deepCopy
public abstract CssValueNode deepCopy()
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String value)
Subclasses should perform additional consistency checks. For example, a boolean expression node will not allow setting this as boolean expression trees are immutable.
-
setIsDefault
public void setIsDefault(boolean isDefault)
-
getIsDefault
public boolean getIsDefault()
-
-