Class KlumJacksonInput

java.lang.Object
com.blackbuild.klum.ast.jackson.KlumJacksonInput

public final class KlumJacksonInput extends Object
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 Details

    • parser

      public static KlumJacksonInput parser(com.fasterxml.jackson.core.JsonParser parser)
      Borrows one single-pass parser. The importer never closes it.
      Parameters:
      parser - caller-owned parser
      Returns:
      immutable parser input
    • tree

      public static KlumJacksonInput tree(com.fasterxml.jackson.databind.JsonNode node)
      Uses an immutable view of a caller-owned Jackson tree.
      Parameters:
      node - caller-owned tree
      Returns:
      immutable tree input
    • map

      public static KlumJacksonInput map(Map<?,?> values)
      Uses a caller-owned Map without mutating it.
      Parameters:
      values - caller-owned values
      Returns:
      immutable map input
    • named

      public KlumJacksonInput named(String source)
      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