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.

    Author:
    Roman Grigoriadi
    • Method Detail

      • 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