Class AdapterBinding
- java.lang.Object
-
- org.eclipse.yasson.internal.components.AbstractComponentBinding
-
- org.eclipse.yasson.internal.components.AdapterBinding
-
public class AdapterBinding extends AbstractComponentBinding
Wrapper for JsonbAdapter generic information and an components itself.
-
-
Constructor Summary
Constructors Constructor Description AdapterBinding(java.lang.reflect.Type fromType, java.lang.reflect.Type toType, javax.json.bind.adapter.JsonbAdapter<?,?> adapter)
Adapter info with type to "adapt from", type to "adapt to" and an components itself.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.json.bind.adapter.JsonbAdapter<?,?>
getAdapter()
Get actual components to adapt object value.java.lang.Class<?>
getComponentClass()
Class of user component.java.lang.reflect.Type
getToType()
Represents a type to which to adapt into.-
Methods inherited from class org.eclipse.yasson.internal.components.AbstractComponentBinding
getBindingType
-
-
-
-
Constructor Detail
-
AdapterBinding
public AdapterBinding(java.lang.reflect.Type fromType, java.lang.reflect.Type toType, javax.json.bind.adapter.JsonbAdapter<?,?> adapter)
Adapter info with type to "adapt from", type to "adapt to" and an components itself.- Parameters:
fromType
- from not nulltoType
- to not nulladapter
- components not null
-
-
Method Detail
-
getToType
public java.lang.reflect.Type getToType()
Represents a type to which to adapt into. During marshalling object property is adapted to this type and result is marshalled. During unmarshalling object is unmarshalled into this type first, than converted to field type and set.- Returns:
- Type from which to adapt
-
getAdapter
public javax.json.bind.adapter.JsonbAdapter<?,?> getAdapter()
Get actual components to adapt object value.- Returns:
- components
-
getComponentClass
public java.lang.Class<?> getComponentClass()
Description copied from class:AbstractComponentBinding
Class of user component.- Specified by:
getComponentClass
in classAbstractComponentBinding
- Returns:
- component class
-
-