Class JDOQLSingleStringParser.Parser

  • Enclosing class:
    JDOQLSingleStringParser

    private static class JDOQLSingleStringParser.Parser
    extends java.lang.Object
    Tokenizer that provides access to current token.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean extended  
      (package private) java.lang.String[] keywords
      keywords
      (package private) java.lang.String queryString  
      (package private) int queryStringPos  
      (package private) int tokenIndex
      current token cursor position
      (package private) java.lang.String[] tokens
      tokens
    • Constructor Summary

      Constructors 
      Constructor Description
      Parser​(java.lang.String str, boolean extended)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String parseContent​(boolean allowSubentries)
      Parse the content until a keyword is found
      java.lang.String parseKeyword()
      Parse the next token looking for a keyword.
      boolean parseKeyword​(java.lang.String keyword)
      Parse the next token looking for a keyword.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • extended

        final boolean extended
      • queryString

        final java.lang.String queryString
      • queryStringPos

        int queryStringPos
      • tokens

        final java.lang.String[] tokens
        tokens
      • keywords

        final java.lang.String[] keywords
        keywords
      • tokenIndex

        int tokenIndex
        current token cursor position
    • Constructor Detail

      • Parser

        public Parser​(java.lang.String str,
                      boolean extended)
        Constructor
        Parameters:
        str - String to parse
    • Method Detail

      • parseContent

        public java.lang.String parseContent​(boolean allowSubentries)
        Parse the content until a keyword is found
        Parameters:
        allowSubentries - Whether to permit subentries (in parentheses) in this next block
        Returns:
        the content
      • parseKeyword

        public boolean parseKeyword​(java.lang.String keyword)
        Parse the next token looking for a keyword. The cursor position is skipped in one tick if a keyword is found
        Parameters:
        keyword - the searched keyword
        Returns:
        true if the keyword
      • parseKeyword

        public java.lang.String parseKeyword()
        Parse the next token looking for a keyword. The cursor position is skipped in one tick if a keyword is found
        Returns:
        the parsed keyword or null