Class CssDeclarationValueTokenizer
java.lang.Object
com.itextpdf.styledxmlparser.css.parse.CssDeclarationValueTokenizer
- Direct Known Subclasses:
-
CssDeclarationVarParser
Tokenizer for CSS declaration values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Token class.static enumEnumeration of the different token types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe depth.protected intThe current index.protected booleanIndicates if we're inside a string.protected final StringThe source string.protected charThe quote string, either "'" or "\"". -
Constructor Summary
ConstructorsConstructorDescriptionCssDeclarationValueTokenizer(String propertyValue) Creates a newCssDeclarationValueTokenizerinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected CssDeclarationValueTokenizer.TokenGets the next token.Gets the next valid token.protected CssDeclarationValueTokenizer.TokenparseFunctionToken(CssDeclarationValueTokenizer.Token token, int funcDepth) Parse internal function token to full function token, e.g.
-
Field Details
-
src
The source string. -
index
protected int indexThe current index. -
stringQuote
protected char stringQuoteThe quote string, either "'" or "\"". -
inString
protected boolean inStringIndicates if we're inside a string. -
functionDepth
protected int functionDepthThe depth.
-
-
Constructor Details
-
CssDeclarationValueTokenizer
Creates a newCssDeclarationValueTokenizerinstance.- Parameters:
-
propertyValue- the property value
-
-
Method Details
-
getNextValidToken
Gets the next valid token.- Returns:
- the next valid token
-
parseFunctionToken
protected CssDeclarationValueTokenizer.Token parseFunctionToken(CssDeclarationValueTokenizer.Token token, int funcDepth) Parse internal function token to full function token, e.g.calc(calc(tocalc(calc(50px + 5px) + 20px)- Parameters:
-
token- function token to expand -
funcDepth- function depth for resolving, e.g. if you want to resolve only nested function, not the whole declaration - Returns:
- expanded function token
-
getNextToken
Gets the next token.- Returns:
- the next token
-