Interface JsonbComponentInstanceCreator

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
BeanManagerInstanceCreator, DefaultConstructorCreator

public interface JsonbComponentInstanceCreator extends Closeable
Creates instances of JsonbComponents such as JsonbAdapter.

Yasson attempts to load the implementations using ServiceLoader first. If there are multiple implementations found the service provider with the highest priority is used. If there are no service providers found the default implementation is used.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Default component priority.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getOrCreateComponent​(Class<T> componentClass)
    Returns instance of JsonbComponent for desired class.
    default int
     

    Methods inherited from interface java.io.Closeable

    close
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      Default component priority.
      See Also:
      Constant Field Values
  • Method Details

    • getOrCreateComponent

      <T> T getOrCreateComponent(Class<T> componentClass)
      Returns instance of JsonbComponent for desired class.
      Type Parameters:
      T - Jsonb component type
      Parameters:
      componentClass - component class
      Returns:
      component instance
    • getPriority

      default int getPriority()
      Returns:
      the priority of the component