com.vaadin.sass.internal.tree
Class DefNode
java.lang.Object
com.vaadin.sass.internal.tree.Node
com.vaadin.sass.internal.tree.DefNode
- All Implemented Interfaces:
- IVariableNode, Serializable
- Direct Known Subclasses:
- FunctionDefNode, MixinDefNode
public abstract class DefNode
- extends Node
- implements IVariableNode
DefNode defines the shared functionality of mixin and function definition
nodes. This includes the handling of parameter lists.
- Author:
- Vaadin
- See Also:
- Serialized Form
| 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 |
DefNode
public DefNode(String name,
Collection<VariableNode> args,
boolean hasVariableArgs)
getName
public String getName()
getArglist
public List<VariableNode> getArglist()
hasVariableArguments
public boolean hasVariableArguments()
replaceVariables
public void replaceVariables(Collection<VariableNode> variables)
- Specified by:
replaceVariables in interface IVariableNode
replacePossibleArguments
public void replacePossibleArguments(NodeWithVariableArguments actualArgumentNode)
- We have to replace all the mixin or function parameters. This is done in
two phases. First phase replaces all the named parameters while the
second replaces in order of remaining unmodified parameters.
If there are variable arguments (the last argument is of the form $x...),
any remaining arguments are packaged into a list.
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
Copyright © 2013–2014 Vaadin. All rights reserved.