Interface ValidationResultFormatter
public interface ValidationResultFormatter
SPI which can be implemented to print out a summary of a validation result. See
ValidationResults.write(StringWriter, ValidationResultFormatter)
- Since:
- 7.6
- Author:
- Daniel Meyer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
formatElement
(StringWriter writer, ModelElementInstance element) formats an element in the summaryvoid
formatResult
(StringWriter writer, ValidationResult result) formats a validation resultdefault void
formatSuffixWithOmittedResultsCount
(StringWriter writer, int count) formats a suffix with the count of omitted errors/warnings, to be used when writing with a maximum output size limit.default int
getFormattedSuffixWithOmittedResultsSize
(int count) returns the size of the formatted suffix (donating the count of omitted results) in bytes
-
Method Details
-
formatElement
formats an element in the summary- Parameters:
writer
- the writerelement
- the element to write
-
formatResult
formats a validation result- Parameters:
writer
- the writerresult
- the result to format
-
formatSuffixWithOmittedResultsCount
formats a suffix with the count of omitted errors/warnings, to be used when writing with a maximum output size limit. SeeValidationResults.write(StringWriter, ValidationResultFormatter, int)
- Parameters:
writer
- the writercount
- the count of results omitted from the writer output
-
getFormattedSuffixWithOmittedResultsSize
default int getFormattedSuffixWithOmittedResultsSize(int count) returns the size of the formatted suffix (donating the count of omitted results) in bytes- Parameters:
count
- the count of results to be omitted from the writer output- Returns:
- the size of the formatted suffix in bytes
-