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 Details

    • AdapterBinding

      public AdapterBinding(Type fromType, Type toType, jakarta.json.bind.adapter.JsonbAdapter<?,?> adapter)
      Adapter info with type to "adapt from", type to "adapt to" and an components itself.
      Parameters:
      fromType - from not null
      toType - to not null
      adapter - components not null
  • Method Details

    • getToType

      public 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 jakarta.json.bind.adapter.JsonbAdapter<?,?> getAdapter()
      Get actual components to adapt object value.
      Returns:
      components
    • getComponentClass

      public Class<?> getComponentClass()
      Description copied from class: AbstractComponentBinding
      Class of user component.
      Specified by:
      getComponentClass in class AbstractComponentBinding
      Returns:
      component class