Class AdaptedObjectDeserializer<A,T>
- java.lang.Object
-
- org.eclipse.yasson.internal.serializer.AdaptedObjectDeserializer<A,T>
-
- Type Parameters:
A- adapted type, type to deserialize JSON intoT- required type, typically type of the field, which is adapted to another type
- All Implemented Interfaces:
javax.json.bind.serializer.JsonbDeserializer<T>,RuntimeTypeInfo,CurrentItem<T>
public class AdaptedObjectDeserializer<A,T> extends java.lang.Object implements CurrentItem<T>, javax.json.bind.serializer.JsonbDeserializer<T>
Decorator for an item which builds adapted type instance by aJsonbAdapter. After adapted item is finished building its instance is converted to field type object by calling components.
-
-
Constructor Summary
Constructors Constructor Description AdaptedObjectDeserializer(AdapterBinding adapterInfo, AbstractContainerDeserializer<?> wrapperItem)Creates decoration instance wrapping real adapted object item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tdeserialize(javax.json.stream.JsonParser parser, javax.json.bind.serializer.DeserializationContext context, java.lang.reflect.Type rtType)ClassModelgetClassModel()Class model containing property for this item.java.lang.reflect.TypegetRuntimeType()Returns a runtime type.CurrentItem<?>getWrapper()Item wrapper.voidsetAdaptedTypeDeserializer(javax.json.bind.serializer.JsonbDeserializer<A> adaptedTypeDeserializer)Sets adapted item.
-
-
-
Constructor Detail
-
AdaptedObjectDeserializer
public AdaptedObjectDeserializer(AdapterBinding adapterInfo, AbstractContainerDeserializer<?> wrapperItem)
Creates decoration instance wrapping real adapted object item.- Parameters:
adapterInfo- components type infowrapperItem- wrapper item to get instance from
-
-
Method Detail
-
getClassModel
public ClassModel getClassModel()
Description copied from interface:CurrentItemClass model containing property for this item.- Specified by:
getClassModelin interfaceCurrentItem<A>- Returns:
- Class model.
-
getWrapper
public CurrentItem<?> getWrapper()
Description copied from interface:CurrentItemItem wrapper. Null only in case of a root item.- Specified by:
getWrapperin interfaceCurrentItem<A>- Specified by:
getWrapperin interfaceRuntimeTypeInfo- Returns:
- Wrapper item of this item.
-
getRuntimeType
public java.lang.reflect.Type getRuntimeType()
Description copied from interface:RuntimeTypeInfoReturns a runtime type. It can be a class,ParameterizedTypeorTypeVariable.- Specified by:
getRuntimeTypein interfaceRuntimeTypeInfo- Returns:
- Runtime type or null if not defined.
-
setAdaptedTypeDeserializer
public void setAdaptedTypeDeserializer(javax.json.bind.serializer.JsonbDeserializer<A> adaptedTypeDeserializer)
Sets adapted item.- Parameters:
adaptedTypeDeserializer- Adapted item to set.
-
-