Package dev.omnist.codec
Class WriteReport
java.lang.Object
dev.omnist.codec.WriteReport
Accumulates the
format.* adjustments (omnist-spec §8.3.8) a codec's writer
made while serializing a document that couldn't be represented exactly in the
target format. Mutable during a single write call; callers get an immutable
snapshot via adjustments().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRecords a single adjustment.voidaddAll(List<WriteAdjustment> other) Appends every adjustment fromotherto this report, preserving order.Returns an immutable snapshot of every adjustment recorded so far, in the order they were added.toString()
-
Constructor Details
-
WriteReport
public WriteReport()
-
-
Method Details
-
add
Records a single adjustment.- Parameters:
path- the Document path of the affected leaf, e.g."$.a.b"code- the namespaced diagnostic code, e.g.format.null-unrepresentablemessage- a human-readable description of the adjustmentseverity-"warning"or"error"per §8.3.8's table
-
addAll
Appends every adjustment fromotherto this report, preserving order. -
adjustments
Returns an immutable snapshot of every adjustment recorded so far, in the order they were added. -
toString
-