Package org.tomlj
Interface TomlParseResult
- All Superinterfaces:
MutableTomlTable,TomlTable
The result from parsing a TOML document.
Parsing never throws for invalid input. Instead, every error is recorded in errors() and parsing continues
with the next expression, so a document with errors still yields the values that could be parsed. Callers should
check hasErrors() before relying on the result. A key/value pair containing a syntax error is omitted from
the result.
A parse result is a MutableTomlTable, so a parsed document can be changed and written back out with
TomlTable.toToml(), written back from the text it was parsed from; see TomlWriteOptions. errors()
reports only what was found while parsing, and is unaffected by any change made afterwards.
-
Method Summary
Modifier and TypeMethodDescriptionerrors()The errors that occurred during parsing.default booleantrueif the TOML document contained errors.Methods inherited from interface org.tomlj.MutableTomlTable
addComment, addComment, addComment, clear, entry, entry, getArray, getArray, getOrCreateArray, getOrCreateArray, getOrCreateTable, getOrCreateTable, getTable, getTable, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentAfter, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, insertCommentBefore, isModified, isModified, isModified, reformat, remove, remove, removeComment, removeComment, removeComment, removeCommentAbove, removeCommentAbove, removeCommentAfter, removeCommentAfter, set, set, setComment, setComment, setComment, setComment, setCommentAbove, setCommentAbove, setCommentAbove, setCommentAbove, setCommentAfter, setCommentAfterMethods inherited from interface org.tomlj.TomlTable
comment, comment, comments, comments, contains, contains, dottedEntrySet, dottedEntrySet, dottedKeySet, dottedKeySet, elements, entryPathSet, entryPathSet, entrySet, get, get, getArrayOrEmpty, getArrayOrEmpty, getBoolean, getBoolean, getBoolean, getBoolean, getDouble, getDouble, getDouble, getDouble, getLocalDate, getLocalDate, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLocalTime, getLocalTime, getLong, getLong, getLong, getLong, getOffsetDateTime, getOffsetDateTime, getOffsetDateTime, getOffsetDateTime, getString, getString, getString, getString, getTableOrEmpty, getTableOrEmpty, inputPositionOf, inputPositionOf, isArray, isArray, isBoolean, isBoolean, isDouble, isDouble, isEmpty, isLocalDate, isLocalDate, isLocalDateTime, isLocalDateTime, isLocalTime, isLocalTime, isLong, isLong, isOffsetDateTime, isOffsetDateTime, isString, isString, isTable, isTable, keyPathSet, keyPathSet, keySet, size, toJson, toJson, toJson, toJson, toMap, toToml, toToml, toToml, toToml
-
Method Details
-
hasErrors
default boolean hasErrors()trueif the TOML document contained errors.- Returns:
trueif the TOML document contained errors.
-
errors
List<TomlParseError> errors()The errors that occurred during parsing.- Returns:
- A list of errors.
-