com.vaadin.sass.internal.visitor
Class LoopNodeHandler

java.lang.Object
  extended by com.vaadin.sass.internal.visitor.LoopNodeHandler
Direct Known Subclasses:
EachNodeHandler, ForNodeHandler

public abstract class LoopNodeHandler
extends Object

Base class for handlers of all kinds of looping nodes (@for, @while, @each).


Constructor Summary
LoopNodeHandler()
           
 
Method Summary
protected static void replaceLoopNode(Node loopNode, Iterable<VariableNode> loopVariables, boolean replaceAllVariables)
          Replace a loop node (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopNodeHandler

public LoopNodeHandler()
Method Detail

replaceLoopNode

protected static void replaceLoopNode(Node loopNode,
                                      Iterable<VariableNode> loopVariables,
                                      boolean replaceAllVariables)
Replace a loop node (e.g. ForNode) with the expanded set of nodes.

Parameters:
loopNode - node to replace
loopVariables - iterable of the loop variable instances for each iteration - typically a collection for a fixed iteration count loop
replaceAllVariables - true to replace all variables on every iteration, false to only replace the loop variable with its value (other variables are replaced after the whole loop has been expanded)


Copyright © 2013–2014 Vaadin. All rights reserved.