Class ExtensionContext

java.lang.Object
com.fasterxml.jackson.jr.ob.api.ExtensionContext

public abstract class ExtensionContext extends Object
API that lets JacksonJrExtensions to register handlers it needs to.
Since:
2.11
  • Constructor Details

    • ExtensionContext

      public ExtensionContext()
  • Method Details

    • isEnabled

      public abstract boolean isEnabled(JSON.Feature feature)
      Method for checking whether given JSON.Feature is enabled.
      Parameters:
      feature - Feature to check
      Returns:
      True if given JSON.Feature is enabled; false if not
      Since:
      2.17
    • setTreeCodec

      public abstract ExtensionContext setTreeCodec(com.fasterxml.jackson.core.TreeCodec tc)
      Method for setting TreeCodec to use, replacing codec that was formerly configured (if any).
      Parameters:
      tc - (optional) Tree Codec to use, or null for removing currently configured one
      Returns:
      This context, to allow call chaining
    • treeCodec

      public abstract com.fasterxml.jackson.core.TreeCodec treeCodec()
      Returns:
      TreeCodec currently configured to be used, if any (null if none).
    • insertProvider

      public abstract ExtensionContext insertProvider(ReaderWriterProvider provider)
      Method for inserting specified ReaderWriterProvider as the highest priority provider (that is, having higher precedence than anything registered so far)
      Parameters:
      provider - Provider to register
      Returns:
      This context, to allow call chaining
    • appendProvider

      public abstract ExtensionContext appendProvider(ReaderWriterProvider provider)
      Method for inserting specified ReaderWriterProvider as the lowest priority provider (that is, having lower precedence than anything registered so far)
      Parameters:
      provider - Provider to register
      Returns:
      This context, to allow call chaining
    • insertModifier

      public abstract ExtensionContext insertModifier(ReaderWriterModifier modifier)
      Method for inserting specified ReaderWriterModifier as the highest priority modifier (that is, being called before any other modifiers registered).
      Parameters:
      modifier - Modifier to register
      Returns:
      This context, to allow call chaining
    • appendModifier

      public abstract ExtensionContext appendModifier(ReaderWriterModifier modifier)
      Method for inserting specified ReaderWriterModifier as the lowest priority modifier (that is, being called after all other modifiers registered).
      Parameters:
      modifier - Modifier to register
      Returns:
      This context, to allow call chaining