Package org.eclipse.yasson.spi
Interface JsonbComponentInstanceCreator
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
BeanManagerInstanceCreator,DefaultConstructorCreator
public interface JsonbComponentInstanceCreator extends java.io.CloseableCreates instances of JsonbComponents such as JsonbAdapter.Yasson attempts to load the implementations using
ServiceLoaderfirst. 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 intDEFAULT_PRIORITYDefault component priority.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> TgetOrCreateComponent(java.lang.Class<T> componentClass)Returns instance of JsonbComponent for desired class.default intgetPriority()
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
Default component priority.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrCreateComponent
<T> T getOrCreateComponent(java.lang.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
-
-