com.vaadin.sass.internal.tree
Class Node

java.lang.Object
  extended by 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

Nested Class Summary
static interface Node.BuildStringStrategy
           
static class Node.PrintStrategy
           
static class Node.ToStringStrategy
           
 
Field Summary
protected  ArrayList<Node> children
           
protected  Node parentNode
           
static Node.BuildStringStrategy PRINT_STRATEGY
           
static Node.BuildStringStrategy TO_STRING_STRATEGY
           
 
Constructor Summary
Node()
           
 
Method Summary
 void appendAll(Collection<Node> nodes)
           
 void appendChild(Node node)
           
 void appendChild(Node node, Node after)
           
 void appendChildrenAfter(Collection<Node> childrenNodes, Node after)
           
 Node copy()
           
 ArrayList<Node> getChildren()
           
 Node getParentNode()
           
 boolean hasChildren()
           
 String printState()
          Prints out the current state of the node tree.
 void removeChild(Node node)
           
 void setChildren(ArrayList<Node> children)
           
abstract  void traverse()
          Method for manipulating the data contained within the Node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_STRATEGY

public static Node.BuildStringStrategy PRINT_STRATEGY

TO_STRING_STRATEGY

public static Node.BuildStringStrategy TO_STRING_STRATEGY

children

protected ArrayList<Node> children

parentNode

protected Node parentNode
Constructor Detail

Node

public Node()
Method Detail

appendAll

public void appendAll(Collection<Node> nodes)

appendChildrenAfter

public void appendChildrenAfter(Collection<Node> childrenNodes,
                                Node after)

appendChild

public void appendChild(Node node)

appendChild

public void appendChild(Node node,
                        Node after)

removeChild

public void removeChild(Node node)

getChildren

public ArrayList<Node> getChildren()

setChildren

public void setChildren(ArrayList<Node> children)

hasChildren

public boolean hasChildren()

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()


Copyright © 2013–2014 Vaadin. All rights reserved.