Class Parser
java.lang.Object
com.fasterxml.jackson.dataformat.toml.Parser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TomlStreamReadException.ErrorContextprivate static final com.fasterxml.jackson.databind.node.JsonNodeFactoryprivate final Lexerprivate static final intprivate TomlTokenprivate final intprivate final TomlFactory -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateParser(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, TomlStreamReadException.ErrorContext errorContext, int options, Reader reader) -
Method Summary
Modifier and TypeMethodDescriptionprivate Parser.TomlArrayNodegetOrCreateArray(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int childDepth) private Parser.TomlObjectNodegetOrCreateObject(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int childDepth) com.fasterxml.jackson.databind.node.ObjectNodeparse()static com.fasterxml.jackson.databind.node.ObjectNodeDeprecated.static com.fasterxml.jackson.databind.node.ObjectNodeparse(TomlFactory tomlFactory, com.fasterxml.jackson.core.io.IOContext ioContext, Reader reader) private Parser.FieldRefparseAndEnterKey(Parser.TomlObjectNode outer, boolean forTable, int outerDepth) private com.fasterxml.jackson.databind.node.ArrayNodeparseArray(int nextState, int arrayDepth) private com.fasterxml.jackson.databind.JsonNodeparseDateTime(int nextState) private com.fasterxml.jackson.databind.JsonNodeparseFloat(int nextState) private com.fasterxml.jackson.databind.node.ObjectNodeparseInlineTable(int nextState, int tableDepth) private com.fasterxml.jackson.databind.JsonNodeparseInt(int nextState) private com.fasterxml.jackson.databind.node.ValueNodeparseIntFromBuffer(char[] buffer, int start, int length) private voidparseKeyVal(Parser.TomlObjectNode target, int nextState, int targetDepth) private com.fasterxml.jackson.databind.JsonNodeparseValue(int nextState, int valueDepth) private TomlTokenpeek()private TomlTokenpoll(int nextState) Note: Polling also lexes the next token, so methods likeLexer.yytext()will not work afterwardsprivate voidpollExpected(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
-
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, int outerDepth) throws IOException - Throws:
IOException
-
parseValue
private com.fasterxml.jackson.databind.JsonNode parseValue(int nextState, int valueDepth) throws IOException - 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, int tableDepth) throws IOException - Throws:
IOException
-
parseArray
private com.fasterxml.jackson.databind.node.ArrayNode parseArray(int nextState, int arrayDepth) throws IOException - Throws:
IOException
-
parseKeyVal
private void parseKeyVal(Parser.TomlObjectNode target, int nextState, int targetDepth) throws IOException - Throws:
IOException
-
getOrCreateObject
private Parser.TomlObjectNode getOrCreateObject(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int childDepth) throws IOException - Throws:
IOException
-
getOrCreateArray
private Parser.TomlArrayNode getOrCreateArray(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int childDepth) throws IOException - Throws:
IOException
-