|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.parser.SassExpression
public class SassExpression
SassExpressions are used for representing and evaluating arithmetic expressions.
| Constructor Summary | |
|---|---|
|
SassExpression(LexicalUnitImpl chain)
|
protected |
SassExpression(List<SassListItem> items)
|
| Method Summary | |
|---|---|
String |
buildString(Node.BuildStringStrategy strategy)
Return a string representation of this item using the given strategy of converting items to strings. |
boolean |
containsArithmeticalOperator()
Checks whether the item contains an arithmetic expression. |
SassListItem |
evaluateArithmeticExpressions()
Evaluates the arithmetic expressions of this item without modifying this item. |
int |
getColumnNumber()
|
LexicalUnitImpl |
getContainedValue()
|
int |
getLineNumber()
|
String |
printState()
Returns a string representation of this item. |
SassListItem |
replaceChains()
Returns an object that is otherwise similar to this but chains of LexicalUnitImpl objects have been replaced with SassExpressions representing the same expressions. |
SassExpression |
replaceFunctions()
Returns a new item that is the result of evaluating all functions in this item. |
SassExpression |
replaceVariables(Collection<VariableNode> variables)
Returns a new item that is otherwise equal to this one but all occurrences of the given variables have been replaced by the values given in the VariableNodes. |
String |
toString()
|
String |
unquotedString()
Returns a string representation of this item with surrounding quotation marks of the same type (" or ') removed. |
void |
updateUrl(String prefix)
Updates all url's of this item by, e.g., adding the prefix to an url not starting with slash "/" and not containing the symbol ":". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SassExpression(LexicalUnitImpl chain)
protected SassExpression(List<SassListItem> items)
| Method Detail |
|---|
public int getLineNumber()
getLineNumber in interface SassListItempublic int getColumnNumber()
getColumnNumber in interface SassListItempublic boolean containsArithmeticalOperator()
SassListItem
containsArithmeticalOperator in interface SassListItempublic SassListItem evaluateArithmeticExpressions()
SassListItem
evaluateArithmeticExpressions in interface SassListItempublic SassExpression replaceFunctions()
SassListItem
replaceFunctions in interface SassListItempublic SassExpression replaceVariables(Collection<VariableNode> variables)
SassListItem
replaceVariables in interface SassListItempublic void updateUrl(String prefix)
SassListItem
updateUrl in interface SassListItemprefix - The prefix to be added.public String printState()
SassListItemLexicalUnitImpl.printState(). For a list, the string
representation contains the list items separated with the separator
character of the list. No parentheses appear in the string representation
of a list, for valid CSS output.
printState in interface SassListItempublic String buildString(Node.BuildStringStrategy strategy)
SassListItemLexicalUnitImpl#buildString(BuildStringStrategy).
buildString in interface SassListItemstrategy - Specifies how an item is converted to a string. The strategy
may use the toString- and printState-methods.
public String toString()
toString in class Objectpublic String unquotedString()
SassListItem
unquotedString in interface SassListItempublic LexicalUnitImpl getContainedValue()
getContainedValue in interface SassListItempublic SassListItem replaceChains()
SassListItem
replaceChains in interface SassListItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||