com.vaadin.sass.internal.tree
Class Node
java.lang.Object
com.vaadin.sass.internal.tree.Node
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BlockNode, CommentNode, ContentNode, DefNode, EachDefNode, ElseNode, ExtendNode, FontFaceNode, ForNode, IfElseDefNode, IfNode, ImportNode, KeyframeSelectorNode, KeyframesNode, MediaNode, MicrosoftRuleNode, NestPropertiesNode, NodeWithVariableArguments, ReturnNode, RuleNode, ScssStylesheet, SimpleNode, VariableNode, WhileNode
public abstract class Node
- extends Object
- implements Serializable
- See Also:
- Serialized Form
|
Constructor Summary |
Node()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRINT_STRATEGY
public static Node.BuildStringStrategy PRINT_STRATEGY
TO_STRING_STRATEGY
public static Node.BuildStringStrategy TO_STRING_STRATEGY
Node
public Node()
replaceNode
public void replaceNode(Node oldChild,
Collection<? extends Node> newNodes)
- Replace the child oldNode with a collection of nodes.
- Parameters:
oldChild - child to replacenewNodes - replacing nodes, can be an empty collection
appendAfterNode
public void appendAfterNode(Node after,
Collection<? extends Node> newNodes)
appendChild
public void appendChild(Node node)
- Append a new child node to the end of the child list. This method should
only be used when constructing the Node tree, not when modifying it.
- Parameters:
node - new child to append
removeFromParent
public void removeFromParent()
- Remove this node from its parent (if any).
getChildren
public List<Node> getChildren()
traverse
public abstract void traverse()
- Method for manipulating the data contained within the
Node.
Traversing a node is allowed to modify the node, replace it with one or
more nodes at the same or later position in its parent and modify the
children of the node, but not modify or remove preceding nodes in its
parent.
printState
public String printState()
- Prints out the current state of the node tree. Will return SCSS before
compile and CSS after.
Result value could be null.
- Returns:
- State as a string
getParentNode
public Node getParentNode()
copy
public Node copy()
traverseChildren
public void traverseChildren()
Copyright © 2013–2014 Vaadin. All rights reserved.