Class CssDeclarationValueTokenizer

java.lang.Object
com.itextpdf.styledxmlparser.css.parse.CssDeclarationValueTokenizer

public class CssDeclarationValueTokenizer extends Object
Tokenizer for CSS declaration values.
  • Field Details

    • src

      private 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 Details

    • CssDeclarationValueTokenizer

      public CssDeclarationValueTokenizer(String propertyValue)
      Creates a new CssDeclarationValueTokenizer instance.
      Parameters:
      propertyValue - the property value
  • Method Details

    • 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, StringBuilder functionBuffer)
      Processes a function token.
      Parameters:
      token - the token
      functionBuffer - the function buffer