Class CssConditionalRuleNode
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.CssConditionalRuleNode
- All Implemented Interfaces:
Locatable
A node representing a conditional rule such as @if or @else.
-
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
ConstructorsConstructorDescriptionCssConditionalRuleNode(CssAtRuleNode.Type type, CssLiteralNode name) Constructor of a conditional rule.CssConditionalRuleNode(CssAtRuleNode.Type type, CssLiteralNode name, CssBooleanExpressionNode condition, CssAbstractBlockNode block) Constructor of a conditional rule.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()getBlock()Subclasses should overridegetBlockto return a more specific subclass ofCssAbstractBlockNode.Can only be called after the node is completely built (meaning it has the condition set).Methods inherited from class com.google.common.css.compiler.ast.CssAtRuleNode
getName, getParameters, getParametersCount, getType, setParameters, toStringMethods inherited from class com.google.common.css.compiler.ast.CssNodesListNode
addChildToBack, childIterable, getChildAt, getChildIterator, getChildren, getLastChild, getSourceCodeLocation, isEmpty, isEnclosedWithBraces, numChildren, replaceChildAtMethods 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 Details
-
CssConditionalRuleNode
Constructor of a conditional rule.- Parameters:
type- Type of the rulename- Name of the rule
-
CssConditionalRuleNode
public CssConditionalRuleNode(CssAtRuleNode.Type type, CssLiteralNode name, @Nullable CssBooleanExpressionNode condition, CssAbstractBlockNode block) Constructor of a conditional rule.- Parameters:
type- Type of the rulename- Name of the rulecondition- The condition of the ruleblock- A block
-
CssConditionalRuleNode
Copy constructor.- Parameters:
node- node
-
-
Method Details
-
deepCopy
-
getCondition
Can only be called after the node is completely built (meaning it has the condition set).- Returns:
- condiiton
-
getBlock
Description copied from class:CssAtRuleNodeSubclasses should overridegetBlockto return a more specific subclass ofCssAbstractBlockNode.- Overrides:
getBlockin classCssAtRuleNode
-