Class DefaultConversionContext
java.lang.Object
org.mapstruct.ap.internal.model.common.DefaultConversionContext
- All Implemented Interfaces:
ConversionContext
Default implementation of the
ConversionContext passed to conversion providers.- Author:
- Gunnar Morling
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultConversionContext(TypeFactory typeFactory, FormattingMessager messager, Type sourceType, Type targetType, FormattingParameters formattingParameters) -
Method Summary
Modifier and TypeMethodDescriptionReturns the date format if this conversion or built-in method is from String to a date type (e.g.protected FormattingMessagerReturns the source type of this conversion.Returns the target type of this conversion.
-
Constructor Details
-
DefaultConversionContext
public DefaultConversionContext(TypeFactory typeFactory, FormattingMessager messager, Type sourceType, Type targetType, FormattingParameters formattingParameters)
-
-
Method Details
-
getTargetType
Description copied from interface:ConversionContextReturns the target type of this conversion.- Specified by:
getTargetTypein interfaceConversionContext- Returns:
- The target type of this conversion.
-
getSourceType
Description copied from interface:ConversionContextReturns the source type of this conversion.- Specified by:
getSourceTypein interfaceConversionContext- Returns:
- The source type of this conversion.
-
getNumberFormat
- Specified by:
getNumberFormatin interfaceConversionContext
-
getLocale
- Specified by:
getLocalein interfaceConversionContext
-
getDateFormat
Description copied from interface:ConversionContextReturns the date format if this conversion or built-in method is from String to a date type (e.g.Date) or vice versa.- Specified by:
getDateFormatin interfaceConversionContext- Returns:
- The date format if this conversion or built-in method is from String to a date type.
nullis returned for other types or if not given.
-
getTypeFactory
- Specified by:
getTypeFactoryin interfaceConversionContext
-
getMessager
-