Class ReverseConversion

java.lang.Object
org.mapstruct.ap.internal.conversion.ReverseConversion
All Implemented Interfaces:
ConversionProvider

public class ReverseConversion extends Object implements ConversionProvider
* A ConversionProvider which creates the inversed conversions for a given conversion provider.
Author:
Gunnar Morling
  • Method Details

    • inverse

      public static ReverseConversion inverse(ConversionProvider conversionProvider)
    • to

      public Assignment to(ConversionContext conversionContext)
      Description copied from interface: ConversionProvider
      Creates the conversion from source to target of a property mapping.
      Specified by:
      to in interface ConversionProvider
      Parameters:
      conversionContext - ConversionContext providing optional information required for creating the conversion.
      Returns:
      A conversion from source to target.
    • from

      public Assignment from(ConversionContext conversionContext)
      Description copied from interface: ConversionProvider
      Creates the conversion from target to source of a property mapping.
      Specified by:
      from in interface ConversionProvider
      Parameters:
      conversionContext - ConversionContext providing optional information required for creating the conversion.
      Returns:
      A conversion from target to source.
    • getRequiredHelperMethods

      public List<HelperMethod> getRequiredHelperMethods(ConversionContext conversionContext)
      Description copied from interface: ConversionProvider
      Retrieves any helper methods required for creating the conversion.
      Specified by:
      getRequiredHelperMethods in interface ConversionProvider
      Parameters:
      conversionContext - ConversionContext providing optional information required for creating the conversion.
      Returns:
      any helper methods when required.
    • getRequiredHelperFields

      public List<FieldReference> getRequiredHelperFields(ConversionContext conversionContext)
      Description copied from interface: ConversionProvider
      Retrieves any fields required for creating the conversion.
      Specified by:
      getRequiredHelperFields in interface ConversionProvider
      Parameters:
      conversionContext - ConversionContext providing optional information required for creating the conversion.
      Returns:
      any fields when required.