|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.tree.Node
public abstract class Node
| Nested Class Summary | |
|---|---|
static interface |
Node.BuildStringStrategy
|
static class |
Node.PrintStrategy
|
static class |
Node.ToStringStrategy
|
| Field Summary | |
|---|---|
static Node.BuildStringStrategy |
PRINT_STRATEGY
|
static Node.BuildStringStrategy |
TO_STRING_STRATEGY
|
| Constructor Summary | |
|---|---|
|
Node()
|
protected |
Node(Node nodeToCopy)
|
| Method Summary | |
|---|---|
void |
appendChild(Node node)
Append a new child node to the end of the child list. |
abstract Node |
copy()
Copy a node (deep copy including children). |
protected Collection<Node> |
copyChildren()
|
List<Node> |
getChildren()
|
Node |
getNormalParentNode()
|
Node |
getParentNode()
|
String |
printState()
Prints out the current state of the node tree. |
void |
replaceNode(Node oldChild,
Collection<? extends Node> newNodes)
Replace the child oldChild with a collection of nodes. |
void |
replaceNodeAt(int index,
Node newChild)
Replace the child at the given position with another node. |
protected void |
setChildren(Collection<Node> newChildren)
Deprecated. |
abstract Collection<Node> |
traverse(ScssContext context)
Method for manipulating the data contained within the Node. |
Collection<Node> |
traverseChildren(ScssContext context)
|
protected Collection<Node> |
traverseChildren(ScssContext context,
boolean newScope)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Node.BuildStringStrategy PRINT_STRATEGY
public static Node.BuildStringStrategy TO_STRING_STRATEGY
| Constructor Detail |
|---|
public Node()
protected Node(Node nodeToCopy)
| Method Detail |
|---|
public void replaceNodeAt(int index,
Node newChild)
index - the position of the old node that is to be replacednewChild - replacing node
public void replaceNode(Node oldChild,
Collection<? extends Node> newNodes)
oldChild - child to replacenewNodes - replacing nodes, can be an empty collectionpublic void appendChild(Node node)
node - new child to appendpublic List<Node> getChildren()
@Deprecated protected void setChildren(Collection<Node> newChildren)
public abstract Collection<Node> traverse(ScssContext context)
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. Traversing a node is also allowed to modify the definitions
currently in scope as its side-effect.
context - current compilation context
public String printState()
public Node getParentNode()
public Node getNormalParentNode()
public abstract Node copy()
protected Collection<Node> copyChildren()
public Collection<Node> traverseChildren(ScssContext context)
protected Collection<Node> traverseChildren(ScssContext context,
boolean newScope)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||