com.vaadin.sass.internal.tree
Class ReturnNode

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

public class ReturnNode
extends Node
implements IVariableNode, NodeWithUrlContent

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
PRINT_STRATEGY, TO_STRING_STRATEGY
 
Constructor Summary
ReturnNode(SassListItem expression)
           
 
Method Summary
 ReturnNode copy()
          Copy a node (deep copy including children).
 SassListItem evaluate(ScssContext context)
          Evaluate the value of the return node in a context defined by the state of ScssStylesheet (variables currently in scope, defined custom functions).
 SassListItem getExpr()
           
 void replaceVariables(ScssContext context)
           
 Collection<Node> traverse(ScssContext context)
          Method for manipulating the data contained within the Node.
 ReturnNode updateUrl(String prefix)
          Returns a new Node that is otherwise identical to this but has all urls updated by adding the specified prefix and cleaning the resulting path to, e.g., eliminate redundant parent folder references.
 
Methods inherited from class com.vaadin.sass.internal.tree.Node
appendChild, copyChildren, getChildren, getNormalParentNode, getParentNode, printState, replaceNode, replaceNodeAt, setChildren, traverseChildren, traverseChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnNode

public ReturnNode(SassListItem expression)
Method Detail

replaceVariables

public void replaceVariables(ScssContext context)
Specified by:
replaceVariables in interface IVariableNode

traverse

public Collection<Node> traverse(ScssContext context)
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. Traversing a node is also allowed to modify the definitions currently in scope as its side-effect.

Specified by:
traverse in class Node
Parameters:
context - current compilation context
Returns:
nodes replacing the current node

getExpr

public SassListItem getExpr()

evaluate

public SassListItem evaluate(ScssContext context)
Evaluate the value of the return node in a context defined by the state of ScssStylesheet (variables currently in scope, defined custom functions). This method does not modify the ReturnNode itself.


copy

public ReturnNode copy()
Description copied from class: Node
Copy a node (deep copy including children). The copy is detached from the original tree, with null as parent, and data that is not relevant to handling of function or mixin expansion is not copied.

Specified by:
copy in class Node
Returns:
copy of the node

updateUrl

public ReturnNode updateUrl(String prefix)
Description copied from interface: NodeWithUrlContent
Returns a new Node that is otherwise identical to this but has all urls updated by adding the specified prefix and cleaning the resulting path to, e.g., eliminate redundant parent folder references. Does not modify this node.

Specified by:
updateUrl in interface NodeWithUrlContent
Parameters:
prefix - the prefix to be added to all urls contained in this Node.


Copyright © 2013–2015 Vaadin. All rights reserved.