com.vaadin.sass.internal.tree
Class VariableNode

java.lang.Object
  extended by com.vaadin.sass.internal.tree.Node
      extended by com.vaadin.sass.internal.tree.VariableNode
All Implemented Interfaces:
IVariableNode, Serializable

public class VariableNode
extends Node
implements IVariableNode

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.sass.internal.tree.Node
Node.BuildStringStrategy, Node.PrintStrategy, Node.ToStringStrategy
 
Field Summary
 
Fields inherited from class com.vaadin.sass.internal.tree.Node
children, parentNode, PRINT_STRATEGY, TO_STRING_STRATEGY
 
Constructor Summary
VariableNode(String name, SassListItem expr, boolean guarded)
           
 
Method Summary
 VariableNode copy()
           
 SassListItem getExpr()
           
 String getName()
           
 boolean isGuarded()
           
 String printState()
          Prints out the current state of the node tree.
 String replaceInterpolation(String s)
          Replaces each occurrence of ${name} in the parameter.
 void replaceVariables(Collection<VariableNode> variables)
           
 void setExpr(SassListItem expr)
           
 void setGuarded(boolean guarded)
           
 void setName(String name)
           
 String toString()
           
 void traverse()
          Method for manipulating the data contained within the Node.
 
Methods inherited from class com.vaadin.sass.internal.tree.Node
appendAll, appendChild, appendChild, appendChildrenAfter, getChildren, getParentNode, hasChildren, removeChild, setChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableNode

public VariableNode(String name,
                    SassListItem expr,
                    boolean guarded)
Method Detail

getExpr

public SassListItem getExpr()

setExpr

public void setExpr(SassListItem expr)

setName

public void setName(String name)

getName

public String getName()

isGuarded

public boolean isGuarded()

printState

public String printState()
Description copied from class: Node
Prints out the current state of the node tree. Will return SCSS before compile and CSS after. Result value could be null.

Overrides:
printState in class Node
Returns:
State as a string

toString

public String toString()
Overrides:
toString in class Object

setGuarded

public void setGuarded(boolean guarded)

replaceVariables

public void replaceVariables(Collection<VariableNode> variables)
Specified by:
replaceVariables in interface IVariableNode

replaceInterpolation

public String replaceInterpolation(String s)
Replaces each occurrence of ${name} in the parameter. Only evaluates the variable if at least one such occurrence, and then only evaluates it once.


traverse

public void traverse()
Description copied from class: Node
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.

Specified by:
traverse in class Node

copy

public VariableNode copy()
Overrides:
copy in class Node


Copyright © 2013–2014 Vaadin. All rights reserved.