Class CssDeclarationValueTokenizer
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.parse.CssDeclarationValueTokenizer
-
public class CssDeclarationValueTokenizer extends java.lang.Object
Tokenizer for CSS declaration values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CssDeclarationValueTokenizer.Token
The Token class.static class
CssDeclarationValueTokenizer.TokenType
Enumeration of the different token types.
-
Field Summary
Fields Modifier and Type Field Description private int
functionDepth
The depth.private int
index
The current index.private boolean
inString
Indicates if we're inside a string.private java.lang.String
src
The source string.private char
stringQuote
The quote string, either "'" or "\"".
-
Constructor Summary
Constructors Constructor Description CssDeclarationValueTokenizer(java.lang.String propertyValue)
Creates a newCssDeclarationValueTokenizer
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private CssDeclarationValueTokenizer.Token
getNextToken()
Gets the next token.CssDeclarationValueTokenizer.Token
getNextValidToken()
Gets the next valid token.private boolean
isHexDigit(char c)
Checks if a character is a hexadecimal digit.private void
processFunctionToken(CssDeclarationValueTokenizer.Token token, java.lang.StringBuilder functionBuffer)
Processes a function token.
-
-
-
Field Detail
-
src
private java.lang.String src
The source string.
-
index
private int index
The current index.
-
stringQuote
private char stringQuote
The quote string, either "'" or "\"".
-
inString
private boolean inString
Indicates if we're inside a string.
-
functionDepth
private int functionDepth
The depth.
-
-
Constructor Detail
-
CssDeclarationValueTokenizer
public CssDeclarationValueTokenizer(java.lang.String propertyValue)
Creates a newCssDeclarationValueTokenizer
instance.- Parameters:
propertyValue
- the property value
-
-
Method Detail
-
getNextValidToken
public CssDeclarationValueTokenizer.Token getNextValidToken()
Gets the next valid token.- Returns:
- the next valid token
-
getNextToken
private CssDeclarationValueTokenizer.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, java.lang.StringBuilder functionBuffer)
Processes a function token.- Parameters:
token
- the tokenfunctionBuffer
- the function buffer
-
-