Class Parser
java.lang.Object
com.fasterxml.jackson.dataformat.toml.Parser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TomlStreamReadException.ErrorContext
private static final com.fasterxml.jackson.databind.node.JsonNodeFactory
private final Lexer
private static final int
private TomlToken
private final int
private final TomlFactory
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Parser
(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, TomlStreamReadException.ErrorContext errorContext, int options, Reader reader) -
Method Summary
Modifier and TypeMethodDescription(package private) int
private Parser.TomlArrayNode
getOrCreateArray
(com.fasterxml.jackson.databind.node.ObjectNode node, String field) private Parser.TomlObjectNode
getOrCreateObject
(com.fasterxml.jackson.databind.node.ObjectNode node, String field) com.fasterxml.jackson.databind.node.ObjectNode
parse()
static com.fasterxml.jackson.databind.node.ObjectNode
Deprecated.static com.fasterxml.jackson.databind.node.ObjectNode
parse
(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, Reader reader) private Parser.FieldRef
parseAndEnterKey
(Parser.TomlObjectNode outer, boolean forTable) private com.fasterxml.jackson.databind.node.ArrayNode
parseArray
(int nextState) private com.fasterxml.jackson.databind.JsonNode
parseDateTime
(int nextState) private com.fasterxml.jackson.databind.JsonNode
parseFloat
(int nextState) private com.fasterxml.jackson.databind.node.ObjectNode
parseInlineTable
(int nextState) private com.fasterxml.jackson.databind.JsonNode
parseInt
(int nextState) private com.fasterxml.jackson.databind.node.ValueNode
parseIntFromBuffer
(char[] buffer, int start, int length) private void
parseKeyVal
(Parser.TomlObjectNode target, int nextState) private com.fasterxml.jackson.databind.JsonNode
parseValue
(int nextState) private TomlToken
peek()
private TomlToken
poll
(int nextState) Note: Polling also lexes the next token, so methods likeLexer.yytext()
will not work afterwardsprivate void
pollExpected
(TomlToken expected, int nextState)
-
Field Details
-
factory
private static final com.fasterxml.jackson.databind.node.JsonNodeFactory factory -
MAX_CHARS_TO_REPORT
private static final int MAX_CHARS_TO_REPORT- See Also:
-
tomlFactory
-
errorContext
-
options
private final int options -
lexer
-
next
-
-
Constructor Details
-
Parser
private Parser(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, TomlStreamReadException.ErrorContext errorContext, int options, Reader reader) throws IOException - Throws:
IOException
-
-
Method Details
-
parse
@Deprecated public static com.fasterxml.jackson.databind.node.ObjectNode parse(com.fasterxml.jackson.core.io.IOContext ioContext, int options, Reader reader) throws IOException Deprecated.- Throws:
IOException
-
parse
public static com.fasterxml.jackson.databind.node.ObjectNode parse(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, Reader reader) throws IOException - Parameters:
tomlFactory
- factory with configurationioContext
- I/O contextreader
- character stream- Returns:
- parsed
ObjectNode
- Throws:
IOException
- if there are I/O issues- Since:
- v2.15
-
getNestingDepth
int getNestingDepth() -
peek
- Throws:
TomlStreamReadException
-
poll
Note: Polling also lexes the next token, so methods likeLexer.yytext()
will not work afterwards- Throws:
IOException
-
pollExpected
- Throws:
IOException
-
parse
- Throws:
IOException
-
parseAndEnterKey
private Parser.FieldRef parseAndEnterKey(Parser.TomlObjectNode outer, boolean forTable) throws IOException - Throws:
IOException
-
parseValue
- Throws:
IOException
-
parseDateTime
- Throws:
IOException
-
parseInt
- Throws:
IOException
-
parseIntFromBuffer
private com.fasterxml.jackson.databind.node.ValueNode parseIntFromBuffer(char[] buffer, int start, int length) throws TomlStreamReadException - Throws:
TomlStreamReadException
-
parseFloat
- Throws:
IOException
-
parseInlineTable
private com.fasterxml.jackson.databind.node.ObjectNode parseInlineTable(int nextState) throws IOException - Throws:
IOException
-
parseArray
- Throws:
IOException
-
parseKeyVal
- Throws:
IOException
-
getOrCreateObject
private Parser.TomlObjectNode getOrCreateObject(com.fasterxml.jackson.databind.node.ObjectNode node, String field) throws TomlStreamReadException - Throws:
TomlStreamReadException
-
getOrCreateArray
private Parser.TomlArrayNode getOrCreateArray(com.fasterxml.jackson.databind.node.ObjectNode node, String field) throws TomlStreamReadException - Throws:
TomlStreamReadException
-