|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.parser.StringItem
public class StringItem
StringItem is a wrapper class that allows strings to be stored in lists taking SassListItems.
| Constructor Summary | |
|---|---|
StringItem(String s)
|
|
| 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. |
boolean |
containsVariable()
Checks whether this item contains a variable. |
boolean |
equals(Object o)
|
SassListItem |
evaluateFunctionsAndExpressions(ScssContext context,
boolean evaluateArithmetics)
Evaluates the arithmetic expressions and functions of this item without modifying this item. |
int |
getColumnNumber()
|
LexicalUnitImpl |
getContainedValue()
|
int |
getLineNumber()
|
int |
hashCode()
|
String |
printState()
Returns a string representation of this item. |
SassListItem |
replaceVariables(ScssContext context)
Returns a new item that is otherwise equal to this one but all occurrences of variables have been replaced by the values in the current variable scope. |
String |
toString()
|
String |
unquotedString()
Returns a string representation of this item with surrounding quotation marks of the same type (" or ') removed. |
StringItem |
updateUrl(String prefix)
Returns a new item that is obtained from this by updating all url's 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringItem(String s)
| Method Detail |
|---|
public int getLineNumber()
getLineNumber in interface SassListItempublic int getColumnNumber()
getColumnNumber in interface SassListItempublic boolean containsArithmeticalOperator()
SassListItem
containsArithmeticalOperator in interface SassListItem
public SassListItem evaluateFunctionsAndExpressions(ScssContext context,
boolean evaluateArithmetics)
SassListItem
evaluateFunctionsAndExpressions in interface SassListItemcontext - the compilation context in which to evaluate functions,
variables etc.evaluateArithmetics - True indicates that the arithmetic expressions in this item
should be evaluated. This parameter is used to handle the case
where the operator '/' should not be interpreted as an
arithmetic operation. The arithmetic expressions occurring in
the parameter lists of functions will be evaluated even if
evaluateArithmetics is false.
public SassListItem replaceVariables(ScssContext context)
SassListItem
replaceVariables in interface SassListItemcontext - the compilation context in which to evaluate functions,
variables etc.
public StringItem 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 unquotedString()
SassListItem
unquotedString in interface SassListItempublic String toString()
toString in class Objectpublic LexicalUnitImpl getContainedValue()
getContainedValue in interface SassListItempublic boolean containsVariable()
SassListItem
containsVariable in interface SassListItempublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||