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.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_PRIORITY
Default component priority.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> T
getOrCreateComponent(java.lang.Class<T> componentClass)
Returns instance of JsonbComponent for desired class.default int
getPriority()
-
-
-
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
-
-