Package com.blackbuild.klum.ast.jackson
Class KlumJacksonInput
java.lang.Object
com.blackbuild.klum.ast.jackson.KlumJacksonInput
One caller-owned Jackson input for a
KlumJacksonImporter operation.
A parser remains owned by its caller and is neither rewound nor closed. Tree and map inputs are read without
changing the supplied value. Call named(String) to attach an opaque source name to diagnostics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KlumJacksonInputUses a caller-owned Map without mutating it.Returns this input with an opaque source identity used only for diagnostics.static KlumJacksonInputparser(com.fasterxml.jackson.core.JsonParser parser) Borrows one single-pass parser.static KlumJacksonInputtree(com.fasterxml.jackson.databind.JsonNode node) Uses an immutable view of a caller-owned Jackson tree.
-
Method Details
-
parser
Borrows one single-pass parser. The importer never closes it.- Parameters:
parser- caller-owned parser- Returns:
- immutable parser input
-
tree
Uses an immutable view of a caller-owned Jackson tree.- Parameters:
node- caller-owned tree- Returns:
- immutable tree input
-
map
Uses a caller-owned Map without mutating it.- Parameters:
values- caller-owned values- Returns:
- immutable map input
-
named
Returns this input with an opaque source identity used only for diagnostics.- Parameters:
source- opaque source name- Returns:
- equivalent input with that diagnostic source name
-