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 TypeMethodDescription(package private) intprivate Parser.TomlArrayNodegetOrCreateArray(com.fasterxml.jackson.databind.node.ObjectNode node, String field) private Parser.TomlObjectNodegetOrCreateObject(com.fasterxml.jackson.databind.node.ObjectNode node, String field) 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) private com.fasterxml.jackson.databind.node.ArrayNodeparseArray(int nextState) 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) 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) private com.fasterxml.jackson.databind.JsonNodeparseValue(int nextState) 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
-
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
-