Class ReverseConversion
- java.lang.Object
-
- org.mapstruct.ap.internal.conversion.ReverseConversion
-
- All Implemented Interfaces:
ConversionProvider
public class ReverseConversion extends Object implements ConversionProvider
* AConversionProvider
which creates the inversed conversions for a given conversion provider.- Author:
- Gunnar Morling
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Assignment
from(ConversionContext conversionContext)
Creates the conversion from target to source of a property mapping.List<FieldReference>
getRequiredHelperFields(ConversionContext conversionContext)
List<HelperMethod>
getRequiredHelperMethods(ConversionContext conversionContext)
static ReverseConversion
inverse(ConversionProvider conversionProvider)
Assignment
to(ConversionContext conversionContext)
Creates the conversion from source to target of a property mapping.
-
-
-
Method Detail
-
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 interfaceConversionProvider
- 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 interfaceConversionProvider
- 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)
- Specified by:
getRequiredHelperMethods
in interfaceConversionProvider
- Parameters:
conversionContext
- ConversionContext providing optional information required for creating the conversion.- Returns:
- any helper methods when required.
-
getRequiredHelperFields
public List<FieldReference> getRequiredHelperFields(ConversionContext conversionContext)
- Specified by:
getRequiredHelperFields
in interfaceConversionProvider
- Parameters:
conversionContext
- ConversionContext providing optional information required for creating the conversion.- Returns:
- any fields when required.
-
-