Package com.attribyte.parser
Class ParseResult
java.lang.Object
com.attribyte.parser.ParseResult
A parsed resource, on successful parse along with any errors.
- Author:
- Matt Hamer
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.google.common.collect.ImmutableList<ParseError> An immutable list of errors.final StringThe name of the parser used to create this result.The resource, if parse was successful. -
Constructor Summary
ConstructorsConstructorDescriptionParseResult(String parserName, Resource resource) Creates a parse result with a parsed resource and no errors.ParseResult(String parserName, Resource resource, List<ParseError> errors) Creates a parse result with a parsed resource and a list of (non-fatal) errors.ParseResult(String parserName, ParseError error) Creates a parse result with a single error and no parsed resource.ParseResult(String parserName, List<ParseError> errors) Creates a parse result with a list of errors and no parsed resource. -
Method Summary
-
Field Details
-
resource
The resource, if parse was successful. -
errors
An immutable list of errors. -
parserName
The name of the parser used to create this result.
-
-
Constructor Details
-
ParseResult
Creates a parse result with a parsed resource and no errors.- Parameters:
parserName- The name of the parser that created the result.resource- The resource.
-
ParseResult
Creates a parse result with a single error and no parsed resource.- Parameters:
parserName- The name of the parser that created the result.error- The error.
-
ParseResult
Creates a parse result with a list of errors and no parsed resource.- Parameters:
parserName- The name of the parser that created the result.errors- The errors.
-
ParseResult
Creates a parse result with a parsed resource and a list of (non-fatal) errors.- Parameters:
parserName- The name of the parser that created the result.resource- The resource.errors- The errors.
-
-
Method Details