Class Parser


  • class Parser
    extends java.lang.Object
    • Constructor Detail

      • Parser

        private Parser​(TomlFactory tomlFactory,
                       com.fasterxml.jackson.core.io.IOContext ioContext,
                       TomlStreamReadException.ErrorContext errorContext,
                       int options,
                       java.io.Reader reader)
                throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • parse

        @Deprecated
        public static com.fasterxml.jackson.databind.node.ObjectNode parse​(com.fasterxml.jackson.core.io.IOContext ioContext,
                                                                           int options,
                                                                           java.io.Reader reader)
                                                                    throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • parse

        public static com.fasterxml.jackson.databind.node.ObjectNode parse​(TomlFactory tomlFactory,
                                                                           com.fasterxml.jackson.core.io.IOContext ioContext,
                                                                           java.io.Reader reader)
                                                                    throws java.io.IOException
        Parameters:
        tomlFactory - factory with configuration
        ioContext - I/O context
        reader - character stream
        Returns:
        parsed ObjectNode
        Throws:
        java.io.IOException - if there are I/O issues
        Since:
        v2.15
      • getNestingDepth

        int getNestingDepth()
      • poll

        private TomlToken poll​(int nextState)
                        throws java.io.IOException
        Note: Polling also lexes the next token, so methods like Lexer.yytext() will not work afterwards
        Throws:
        java.io.IOException
      • pollExpected

        private void pollExpected​(TomlToken expected,
                                  int nextState)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parse

        public com.fasterxml.jackson.databind.node.ObjectNode parse()
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseValue

        private com.fasterxml.jackson.databind.JsonNode parseValue​(int nextState)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDateTime

        private com.fasterxml.jackson.databind.JsonNode parseDateTime​(int nextState)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseInt

        private com.fasterxml.jackson.databind.JsonNode parseInt​(int nextState)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFloat

        private com.fasterxml.jackson.databind.JsonNode parseFloat​(int nextState)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseInlineTable

        private com.fasterxml.jackson.databind.node.ObjectNode parseInlineTable​(int nextState)
                                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseArray

        private com.fasterxml.jackson.databind.node.ArrayNode parseArray​(int nextState)
                                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseKeyVal

        private void parseKeyVal​(Parser.TomlObjectNode target,
                                 int nextState)
                          throws java.io.IOException
        Throws:
        java.io.IOException