Class CssDeclarationValueTokenizer
java.lang.Object
com.itextpdf.styledxmlparser.css.parse.CssDeclarationValueTokenizer
Tokenizer for CSS declaration values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The Token class.static enum
Enumeration of the different token types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The depth.private int
The current index.private boolean
Indicates if we're inside a string.private String
The source string.private char
The quote string, either "'" or "\"". -
Constructor Summary
ConstructorsConstructorDescriptionCssDeclarationValueTokenizer
(String propertyValue) Creates a newCssDeclarationValueTokenizer
instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the next token.Gets the next valid token.private boolean
isHexDigit
(char c) Checks if a character is a hexadecimal digit.private void
processFunctionToken
(CssDeclarationValueTokenizer.Token token, StringBuilder functionBuffer) Processes a function token.
-
Field Details
-
src
The source string. -
index
private int indexThe current index. -
stringQuote
private char stringQuoteThe quote string, either "'" or "\"". -
inString
private boolean inStringIndicates if we're inside a string. -
functionDepth
private int functionDepthThe depth.
-
-
Constructor Details
-
CssDeclarationValueTokenizer
Creates a newCssDeclarationValueTokenizer
instance.- Parameters:
propertyValue
- the property value
-
-
Method Details
-
getNextValidToken
Gets the next valid token.- Returns:
- the next valid token
-
getNextToken
Gets the next token.- Returns:
- the next token
-
isHexDigit
private boolean isHexDigit(char c) Checks if a character is a hexadecimal digit.- Parameters:
c
- the character- Returns:
- true, if it's a hexadecimal digit
-
processFunctionToken
private void processFunctionToken(CssDeclarationValueTokenizer.Token token, StringBuilder functionBuffer) Processes a function token.- Parameters:
token
- the tokenfunctionBuffer
- the function buffer
-