com.vaadin.sass.internal.tree
Class NodeWithVariableArguments

java.lang.Object
  extended by com.vaadin.sass.internal.tree.Node
      extended by com.vaadin.sass.internal.tree.NodeWithVariableArguments
All Implemented Interfaces:
IVariableNode, Serializable
Direct Known Subclasses:
FunctionNode, MixinNode

public abstract class NodeWithVariableArguments
extends Node
implements IVariableNode

NodeWithVariableArguments is used as a superclass for nodes that handle argument lists with support for variable arguments. When variable arguments are used, a NodeWithVariableArguments expands a list into separate arguments, whereas a DefNode packs several arguments into a list. NodeWithVariableArguments is currently used as a superclass for MixinNode and FunctionNode. The corresponding definition nodes are subclasses of DefNode.

Author:
Vaadin
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
NodeWithVariableArguments(String name, ActualArgumentList parameterList)
           
NodeWithVariableArguments(String name, Collection<VariableNode> args, boolean hasVariableArgs)
           
 
Method Summary
protected abstract  void doTraverse()
           
protected  void expandVariableArguments()
           
 ActualArgumentList getArglist()
           
 String getName()
           
 SassList.Separator getSeparator()
           
 boolean hasVariableArguments()
           
 void replaceVariables(Collection<VariableNode> variables)
          Replace variable references with their values in the argument list and name.
 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, copy, getChildren, getParentNode, hasChildren, printState, removeChild, setChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeWithVariableArguments

public NodeWithVariableArguments(String name,
                                 Collection<VariableNode> args,
                                 boolean hasVariableArgs)

NodeWithVariableArguments

public NodeWithVariableArguments(String name,
                                 ActualArgumentList parameterList)
Method Detail

hasVariableArguments

public boolean hasVariableArguments()

getArglist

public ActualArgumentList getArglist()

expandVariableArguments

protected void expandVariableArguments()

getSeparator

public SassList.Separator getSeparator()

getName

public String getName()

replaceVariables

public void replaceVariables(Collection<VariableNode> variables)
Replace variable references with their values in the argument list and name.

Specified by:
replaceVariables in interface IVariableNode

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

doTraverse

protected abstract void doTraverse()
                            throws Exception
Throws:
Exception


Copyright © 2013–2014 Vaadin. All rights reserved.