Class PrimitiveToWrapperConversion
- java.lang.Object
-
- org.mapstruct.ap.internal.conversion.SimpleConversion
-
- org.mapstruct.ap.internal.conversion.PrimitiveToWrapperConversion
-
- All Implemented Interfaces:
ConversionProvider
public class PrimitiveToWrapperConversion extends SimpleConversion
Conversion between primitive types such asbyteand wrapper types such asInteger.- Author:
- Gunnar Morling
-
-
Constructor Summary
Constructors Constructor Description PrimitiveToWrapperConversion(Class<?> sourceType, Class<?> targetType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFromExpression(ConversionContext conversionContext)Returns the conversion string from target to source.StringgetToExpression(ConversionContext conversionContext)Returns the conversion string from source to target.-
Methods inherited from class org.mapstruct.ap.internal.conversion.SimpleConversion
from, getFromConversionExceptionTypes, getFromConversionImportTypes, getRequiredHelperMethods, getToConversionExceptionTypes, getToConversionImportTypes, to
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mapstruct.ap.internal.conversion.ConversionProvider
getRequiredHelperFields
-
-
-
-
Method Detail
-
getToExpression
public String getToExpression(ConversionContext conversionContext)
Description copied from class:SimpleConversionReturns the conversion string from source to target. The placeholder<SOURCE>can be used to represent a reference to the source value.- Specified by:
getToExpressionin classSimpleConversion- Parameters:
conversionContext- A context providing optional information required for creating the conversion.- Returns:
- The conversion string from source to target
-
getFromExpression
public String getFromExpression(ConversionContext conversionContext)
Description copied from class:SimpleConversionReturns the conversion string from target to source. The placeholder<SOURCE>can be used to represent a reference to the target value.- Specified by:
getFromExpressionin classSimpleConversion- Parameters:
conversionContext- ConversionContext providing optional information required for creating the conversion.- Returns:
- The conversion string from target to source
-
-